nginx配置多个location
location如果一个特定的url 要使用别名,不能用root,用alias指定的目录
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
location /img {
alias C:/Users/22051/Desktop/img;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}