在nginx.conf文件中http{}任意位置添加如下信息(不能添加到server{}中)
include server/*.conf; #加载server文件夹中所有以.conf结尾的配置文件在nginx.conf文件所在目录新建server文件夹,此文件夹下可以创建多个配置文件server

server {
listen 52000;
server_name localhost;
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
博客介绍了在nginx.conf文件的http{}任意位置添加信息(不能加在server{}中),还提到在nginx.conf文件所在目录新建server文件夹,该文件夹下可创建多个配置文件server。
1979

被折叠的 条评论
为什么被折叠?



