我已设置域名以将A记录指向我的VPS IP&添加了以下文件/etc/nginx/conf.d/custom.conf
。
server {
listen 80;
server_name researchnot.es .researchnot.es;
location / {
proxy_pass http://127.0.0.1:8000;
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 https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Host $host;
}
}
我已经运行service nginx configtest
,表示一切正常并重新启动nginx。