在配置文件中添加如下虚拟主机
server {
listen 80;
server_name software.huhaiqing.com;
index index.html index.html;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
location / {
root /software;
}
}
转载于:https://blog.51cto.com/linux10000/1787791