配置静态网站
server {
listen 80;
server_name localhost;
location /{
root html; #默认Nginx站点
index index.html index.htm;
}
location ^~ /itstyle/{
alias /www/itstyle/; #自定义站点,注意都是以斜杠结尾 文件路径自定义不一定是itstyle
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}