diff --git a/data/tpl/nginx_panel.conf b/data/tpl/nginx_panel.conf index 4c6ecaf1b..c487094fd 100755 --- a/data/tpl/nginx_panel.conf +++ b/data/tpl/nginx_panel.conf @@ -10,46 +10,14 @@ server #error_page 404/404.html; #SSL-END - #PROXY-START location ^~ / { proxy_pass http://0.0.0.0:{$PANAL_PORT}/; - proxy_set_header Host 0.0.0.0:{$PANAL_PORT}; - proxy_http_version 1.1; - 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; - add_header X-Cache $upstream_cache_status; - proxy_ignore_headers Set-Cookie Cache-Control expires; - add_header Cache-Control no-cache; - - set $static_files_app 0; - if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) - { - set $static_files_app 1; - expires 12h; - } - if ( $static_files_app = 0 ) - { - add_header Cache-Control no-cache; - } + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; } #PROXY-END - - #禁止访问的文件或目录 - location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) - { - return 404; - } - - #一键申请SSL证书验证目录相关设置 - location ~ \.well-known{ - allow all; - } - - - access_log {$LOGPATH}/{$SERVER_NAME}.log main; error_log {$LOGPATH}/{$SERVER_NAME}.error.log; } \ No newline at end of file