进入nginx/conf
修改nginx.conf文件,添加红色区域内容:
server {
listen 80;
server_name localhost;
server_name gravatar.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location /release {
#root /data/www/file
alias D:/XXX/release;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
alias如果不生效,可以试root
浏览器访问:http://ip:80/release