在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;
}
}