node项目配置成nginx启动
1、新建ant.conf
upstream antNodeJs{ server 127.0.0.1:8000; keepalive 64;}server { listen 80; #listen [::]:80 default_server ipv6only=on; server_name jiqing.ant.com; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Nginx-Proxy true; proxy_set_header Connection ""; proxy_pass http://antNodeJs; } location ~ /\. { deny all; } access_log /home/wwwlogs/access.log;}
2、修改hosts
127.0.0.1 jiqing.ant.com
3、重启nginx
sudo lnmp restart