nginx静态站点配置二级域名跳转到对应子站,所有二级域名使用同一个location,包含SSI支持
hosts文件增加 {本机IP} h1.test.com
`server {
listen 80;
server_name *.test.com;
location /{
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
index index.shtml;
expires 30d;
if ($host ~ (^\S*?(?=\.\S*))){
set $dns $1;
}
root F:/h1/;
}
}`