nginx的nginx.conf目录简单配置

 

 

 我的nginx.conf是在  etc/nginx/目录下

我是直接在http随便找了个地方添加如下代码的:

server {
listen 8066;
server_name 192.168.0.200;

location / {
root /usr/local/nginx/html/xiaoxi/;
index index.html index.htm;
}


error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

其中listen是用户需要访问你的端口号,server_name是你的ip地址

 

posted @ 2022-07-06 16:49  苏州の酱醋茶  阅读(302)  评论(0编辑  收藏  举报