博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nginx发布静态网页
阅读量:7167 次
发布时间:2019-06-29

本文共 740 字,大约阅读时间需要 2 分钟。

 

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

 

转载于:https://www.cnblogs.com/hellojesson/p/9093719.html

你可能感兴趣的文章
验证码在页面中的使用
查看>>
matlab中plot使用方法
查看>>
Java中StringBuilder的清空方法比較
查看>>
把spring-boot项目部署到tomcat容器中
查看>>
linux 技巧:使用 screen 管理你的远程会话
查看>>
git服务器的搭建
查看>>
【RabbitMQ】8、RabbitMQ之mandatory和immediate
查看>>
Google Chrome 未响应。是否立即重新启动?---解决方法(秒速解决)
查看>>
Python中re(正则表达式)模块学习
查看>>
Nginx 配置指令的执行顺序
查看>>
linux压缩日志并删除原始文件
查看>>
windows bat启动多个应用程序
查看>>
使用 SyndicationFeed 输出 Rss
查看>>
一起谈.NET技术,Silverlight面向客户端,HTML5面向Web
查看>>
column 'id' in field list is ambiguous
查看>>
论文笔记之:DeepCAMP: Deep Convolutional Action & Attribute Mid-Level Patterns
查看>>
使用asmcmdcp命令把datafile从文件系统移动(move)到asm磁盘组中 针对11gR2
查看>>
如何修改Windows上某块网卡的MTU的值
查看>>
python列表可以加可以乘
查看>>
21天打造分布式爬虫-豆瓣电影和电影天堂实战(三)
查看>>