在部署网站后,如果打开自己的网页显示的welcome to nginx,而不是自己的网站,则打开目录etc/nginx/conf/nginx.conf
其中有一行
将default改为自己的域名即可
然后执行 nginx -s reload
若报错 invalid PID number
则执行 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
再执行 nginx -s reload 就可以重启nginx了