Skip to content

[Bug] 网站保存配置文件失败 #13547

Description

@QYG2297248353

Contact Information

No response

1Panel Version

v2.2.5

Problem Description

Image

Steps to Reproduce

打开网站,进入配置文件,点击保存并重载就报错,服务异常

网站服务正常,以前也没有问题

The expected correct result

No response

Related log output

Additional Information

静态网站

server {
    listen 80 ; 
    listen 443 ssl ; 
    server_name xxx.xxx; 
    index index.php index.html index.htm default.php default.htm default.html; 
    proxy_set_header Host $host; 
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    proxy_set_header X-Forwarded-Host $server_name; 
    proxy_set_header X-Real-IP $remote_addr; 
    proxy_http_version 1.1; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection $http_connection; 
    access_log /www/sites/xxx.xxx/log/access.log main; 
    error_log /www/sites/xxx.xxx/log/error.log; 

    location /resources/ {
        autoindex on;
        alias /www/sites/xxx.xxx/index/resources/;
        access_log off;
    }
    
    location ^~ /.well-known/acme-challenge {
        allow all; 
        root /usr/share/nginx/html; 
    }
    root /www/sites/xxx.xxx/index; 

    location ^~ /temp/ {
        root /www/sites/xxx.xxx/index;
    
        add_header Vary Accept;
    
        # WebP 优先:客户端支持 WebP → 尝试 .webp
        try_files
            $uri.webp   # 如果访问的是 PNG/JPG,但存在同名 .webp → 用它
            $uri        # 否则仍访问原图
            =404;
    
        autoindex on;
        access_log off;
    
        expires 30d;
        add_header Cache-Control "public, max-age=2592000";
    }
    
    error_page 404 /404.html; 
    ssl_certificate xxx; 
    ssl_certificate_key xxx; 
    ssl_protocols xxx; 
    ssl_ciphers xxx; 
    ssl_prefer_server_ciphers on; 
    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"; 
}

Metadata

Metadata

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