server {
listen 443 ssl;
server_name fn.tianmu.cn;
client_max_body_size 0;
root "/Users/zhaoqidong/PhpProjects/financial/public";
error_log "/Applications/MAMP/logs/nginx_ssl_error.log";
ssl_certificate "/Applications/MAMP/Library/OpenSSL/certs/fn.tianmu.cn.crt";
ssl_certificate_key "/Applications/MAMP/Library/OpenSSL/certs/fn.tianmu.cn.key";
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_session_tickets off;
location / {
try_files $uri $uri/ @proxy;
index index.html index.php;
autoindex off;
}
location @proxy {
proxy_pass http://127.0.0.1:8888;
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 X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header REMOTE-HOST $remote_addr;
}
location /ws/ {
proxy_pass http://127.0.0.1:8080; # 将此地址替换为你的 WebSocket 服务器地址和端口
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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 X-Forwarded-Proto $scheme;
}
location ~ \.php(/.*)*$ {
try_files $uri =404;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /Applications/MAMP/conf/nginx/fastcgi_params;
include /Applications/MAMP/conf/nginx/fastcgi.conf;
fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI_php7.4.33.sock;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js|html|woff|woff2|ttf|svg)$ {
root "/Users/zhaoqidong/PhpProjects/financial/public";
expires 30d;
access_log off;
}
}
最后修改:2024 年 09 月 02 日
© 允许规范转载
3 条评论
2025年10月新盘 做第一批吃螃蟹的人coinsrore.com
新车新盘 嘎嘎稳 嘎嘎靠谱coinsrore.com
新车首发,新的一年,只带想赚米的人coinsrore.com
新盘 上车集合 留下 我要发发 立马进裙coinsrore.com
做了几十年的项目 我总结了最好的一个盘(纯干货)coinsrore.com
新车上路,只带前10个人coinsrore.com
新盘首开 新盘首开 征召客户!!!coinsrore.com
新项目准备上线,寻找志同道合 的合作伙伴coinsrore.com
新车即将上线 真正的项目,期待你的参与coinsrore.com
新盘新项目,不再等待,现在就是最佳上车机会!coinsrore.com
新盘新盘 这个月刚上新盘 新车第一个吃螃蟹!coinsrore.com
新车上路,只带前10个人coinsrore.com
哈哈哈,写的太好了https://www.lawjida.com/