server {
listen 80;
server_name localhost;
charset utf-8;
location / {
root html;
index index.html index.htm;
}
location = /50x.html {
root html;
}
location /demo/ {
proxy_set_header Host $host:$proxy_port;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 60;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_pass 127.0.0.1:8080/;
}
}
nginx代理通用配置
最新推荐文章于 2024-06-27 10:04:36 发布