onlyoffice/documentserver反向代理配置参考

1,894次阅读
没有评论

共计 1564 个字符,预计需要花费 4 分钟才能阅读完成。

server
{
#listen 80;
listen 443 ssl;
listen 443 quic;
http2 on;
server_name web.scit028.com;
index index.html;
root /website/weboffice;
server_tokens off;

#CERT-APPLY-CHECK--START
# 用于 SSL 证书申请时的文件验证相关配置 -- 请勿删除
include /www/server/panel/vhost/nginx/well-known/web.scit028.com.conf;

ssl_certificate /www/server/panel/vhost/cert/web.scit028.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/web.scit028.com/privkey.pem;
ssl_verify_client off;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
add_header Alt-Svc 'quic=":443"; h3=":443"; h3-29=":443"; h3-27=":443";h3-25=":443"; h3-T050=":443"; h3-Q050=":443";h3-Q049=":443";h3-Q048=":443"; h3-Q046=":443"; h3-Q043=":443"';

location / {
proxy_pass http://localhost:7897;
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;

}

#一键申请 SSL 证书验证目录相关设置
location ~ \.well-known{allow all;}

#禁止在证书验证目录放入敏感文件
if ($uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {return 403;}

access_log /www/wwwlogs/web.scit028.com.log;
error_log /www/wwwlogs/web.scit028.com.error.log;
}
打赏小哥

onlyoffice/documentserver 反向代理配置参考 微信打赏 onlyoffice/documentserver 反向代理配置参考 支付宝打赏

正文完
 0
评论(没有评论)