1.node.js下載地址 https://nodejs.org/en/
2.nginx下載地址 http://nginx.org/
3.配置nginx.conf,打開nginx文件夾conf->nginx.conf
4.配置hosts,地址:C:\Windows\System32\drivers\etc
5.配置域名,在雲解析上解析到當前雲主機服務器的IP地址即可,比如域名為hahah.com,在hosts上配置 127.0.0.1 hahah.com
注意事項:由於80端口可能被占用,導致無法安裝nginx
解決方案:1.被IIS或apache...等web服務占用,在cmd窗口,輸入 net stop http ,關閉http服務,在進行安裝即可
2.開機自啟動等軟件占用80端口,sytem占用80端口,嘗試使用: sc config http start= disabled ,重啟電腦
nginx命令行:
啟動服務:start nginx
停止服務:nginx -s stop
重新加載:nginx -s reload(配置文件被修改后需要執行它)