
我的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地址

原创文章,作者:bd101bd101,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/271762.html