码迷,mamicode.com
首页 > 其他好文 > 详细

nginx配置静态项目

时间:2018-11-10 16:50:37      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:cat   server   ice   hash   ati   nignx   配置   oca   端口   

当nignx可以加载下面的这个service时

server {
listen 8085; 
server_name 1.192.60.82;

location / {
root /etc/nginx/hash;
index index.html;
}

}

listen : 端口号
server_name: 访问名称 可以域名可以ip
root: 静态项目的地址
index:静态项目的index页面

访问地址为 1.192.60.82:8085

nginx配置静态项目

标签:cat   server   ice   hash   ati   nignx   配置   oca   端口   

原文地址:https://www.cnblogs.com/yinduang/p/9939689.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!