http://www.jb51.net/article/71384.htmcss
切记不要把项目放在/root下 会出现 nginx open() "" failed (13: Permission denied), client: 的错误html
chmod 777 /root/xxxxxx nginx
即便修改了权限也不行,建议放在/home之下,新建本身的webapp目录。web
修改nginx配置文件:(注意 配置静态文件的路径)segmentfault
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/1190000010487262app
https://www.cnblogs.com/EasonJim/p/7806879.htmlwebapp
https://www.cnblogs.com/piscesLoveCc/p/5794926.htmlspa
https://blog.csdn.net/ljp1919/article/details/72833982.net
https://www.cnblogs.com/sz-jack/p/5206159.htmlcode