Skip to content

webdav挂载正常上传正常预览但是访问404 #877

@mllt992

Description

@mllt992

V2.3,Docker部署,已配置反代理

Lsky :https://img.xxx.com
WebDav:https://yp.xxx.com

webdav配置:

webdav测试连接成功,上传成功,确认图片成功上传。

查看原图,

https://img.xxx.com/c/1/20251205/0ed828ceb737743bff98525747fa4444.png

Image Image

反代理配置如下:
root.conf

location ^~ / {
    proxy_pass http://IP地址:端口; 
    proxy_set_header Host $host; 
    proxy_set_header X-Real-IP $remote_addr; 
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    proxy_set_header REMOTE-HOST $remote_addr; 
    proxy_set_header Scheme $scheme; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection $http_connection; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_set_header X-Forwarded-Port $server_port; 
    proxy_http_version 1.1; 
    add_header X-Cache $upstream_cache_status; 
    add_header Cache-Control no-cache; 
    proxy_ssl_server_name off; 
    proxy_ssl_name $proxy_host; 
    add_header Strict-Transport-Security "max-age=31536000"; 
    add_header Access-Control-Allow-Origin * always; 
    add_header Access-Control-Allow-Methods GET,POST,OPTIONS,PUT,DELETE always; 
    add_header X-Cache $upstream_cache_status; 
    add_header Cache-Control no-cache; 
    if ( $request_method = 'OPTIONS' ) {
        add_header Access-Control-Max-Age 1728000; 
        add_header Content-Type 'text/plain;charset=UTF-8'; 
        add_header Content-Length 0; 
        return 204; 
    }
}

server {
    listen 80 ; 
    listen 443 ssl ; 
    server_name img.xxx.xx; 
    index index.php index.html index.htm default.php default.htm default.html; 
    access_log /www/sites/img.xxx.xx/log/access.log main; 
    error_log /www/sites/img.xxx.xx/log/error.log; 
    location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md) {
        return 404; 
    }
    location ^~ /.well-known {
        allow all; 
        root /usr/share/nginx/html; 
    }
    if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
        return 403; 
    }
    root /www/sites/img.xxx.xx/index; 
    http2 on; 
    if ($scheme = http) {
        return 301 https://$host$request_uri; 
    }
    ssl_certificate /www/sites/img.xxx.xx/ssl/fullchain.pem; 
    ssl_certificate_key /www/sites/img.xxx.xx/ssl/privkey.pem; 
    ssl_protocols TLSv1.3 TLSv1.2; 
    ssl_ciphers 密钥
    ssl_prefer_server_ciphers off; 
    ssl_session_cache shared:SSL:10m; 
    ssl_session_timeout 10m; 
    error_page 497 https://$host$request_uri; 
    proxy_set_header X-Forwarded-Proto https; 
    add_header Strict-Transport-Security "max-age=31536000"; 
    include /www/sites/img.xxx.xx/rewrite/img.mllt.cc.conf; 
    include /www/sites/img.xxx.xx/proxy/*.conf; 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions