核心配置
http {
server {
listen 80;
server_name 10.10.72.86;
location /www/ {
root /data/;
index index.html index.htm;
}
location /image/ {
root /data/;
autoindex on;
}
}
}
- 目录结构为:
- 在浏览器直接访问:
- http://10.10.72.86/www/index.html
- http://10.10.72.86/image/temp.png