nginx.conf
配置多个server属性即可,如下:
... ...events {... ...}... ...http {i... ...server {... ...}server {... ...}server {... ...}server {... ...}server {listen 80;server_name Dojo;charset utf-8;location / {root WebServer/Dojo;#开启目录浏览autoindex on;}}}
注释:记得修改 hosts
文件,将 server_name
制定的域名,映射到 127.0.0.1