upstream backend {
server localhost:8080; # 程序监听端口
}
server {
listen 80;
server_name novel.easyboot.xyz; # 博客域名
access_log off;
location / {
proxy_pass http://backend$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 10m;
}
}
请务必配置
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;