xiaopiao发表在 Linux面板2018-4-25 01:36 [复制链接] 0 4268
listen 8888 ssl http2;
#BT-Panel-SSL-START location ~ /purge(/.*) { proxy_cache_purge cache_one $host$request_uri$is_args$args; #access_log /www/wwwlogs/{$host}_purge_cache.log; } location ~ .*\.(js|css|jpg|png|gif|jpeg)?$ { if ($server_port = 8888) { proxy_pass http://127.0.0.1:8443; add_header X-Cache $upstream_cache_status expires 12h; } 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_cache cache_one; proxy_cache_key $host$request_uri$is_args$args; proxy_cache_valid 200 304 301 302 1h; #持久化连接相关配置 根据需求打开 #proxy_connect_timeout 30s; #proxy_read_timeout 86400s; #proxy_send_timeout 30s; #proxy_http_version 1.1; #proxy_set_header Upgrade $http_upgrade; #proxy_set_header Connection "upgrade"; } location / { if ($server_port = 8888) { proxy_pass http://127.0.0.1:8443; } 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_redirect http://$host/ https://$host:$server_port/; #隐藏「面板 SSL」按钮 sub_filter '"setPanelSSL()"' 'style="display:none"'; sub_filter_types *; sub_filter_once on; } #BT-Panel-SSL-END
本版积分规则 发表回复 回帖后跳转到最后一页
论坛响应时间:72小时
问题处理方式:排队(仅解答)
工作时间:白班:9:00 - 18:00
响应时间:3分钟
问题处理方式:宝塔专家1对1服务
工作时间:工作日:9:00 - 18:30
宝塔专业团队为您解决服务器疑难问题
工作时间:09:00至18:30