http://www.jb51.net/article/71384.htm
切記不要把項目放在/root下 會出現 nginx open() "" failed (13: Permission denied), client: 的錯誤
chmod 777 /root/xxxxxx
即使修改了權限也不行,建議放在/home之下,新建自己的webapp目錄。
修改nginx配置文件:(注意 配置靜態文件的路徑)
server { server_name static.naice.me; // 你的域名或者 ip root /www/static-web/static-web; // 你的克隆到的項目路徑 index index.html; // 顯示首頁 location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|js|pdf|txt){ root /www/static-web/static-web; } // 靜態文件訪問 }
https://segmentfault.com/a/1190000010487262
https://www.cnblogs.com/EasonJim/p/7806879.html
https://www.cnblogs.com/piscesLoveCc/p/5794926.html
https://blog.csdn.net/ljp1919/article/details/72833982
https://www.cnblogs.com/sz-jack/p/5206159.html