server {
#listen 8001;
listen 8001 ssl http2;
server_name shareout.xzdream.cn;
#ssl on;
#charset koi8-r;
#access_log logs/host.access.log main;
server_name_in_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:8001;
proxy_set_header HTTPS YES;
ssl_certificate C:/fullchain.pem;
ssl_certificate_key C:/privkey.pem;
ssl_trusted_certificate C:/chain.pem;
ssl_prefer_server_ciphers on;
proxy_set_header X-Forwarded-Proto https;
location / {
root "C:\Shareout\share_out_file_system\public";
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
add_header Access-Control-Allow-Origin *;
}
location ~* /web-apps/(.*)$ {
proxy_pass http://xx.xx.xx.xx:9010/$request_uri;
break;
}
location /7.0.1-37/ {
proxy_pass http://xx.xx.xx.xx:9010/$request_uri;
break;
}
location /cache/ {
proxy_pass http://xx.xx.xx.xx:9010/$request_uri;
break;
}
location /onlyoffice.php/ {
proxy_pass http://xx.xx.xx.xx:9010/$request_uri;
break;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root "C:\public";
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
https请求http nginx反向代理配置
最新推荐文章于 2024-05-16 15:02:24 发布