vim /etc/nginx/nginx.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name www.scyouju.com;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:8888/;
rewrite ^/.*/$ / last; # Redirect everything to / (ex index.html) and let the JS router take care of the rest
rewrite ^([^.]*[^/])$ $1/ permanent; # Force trailing slash
}
}
nginx -s reload//重启
nginx -c /etc/nginx/nginx.conf//根据指定配置文件启动
Nginx 反向代理配置
最新推荐文章于 2024-08-30 13:56:19 发布