标签:test 技术 home code oca info src conf lang
同一个nginx配置文件,请求不同的域名可以指定对应的目录
cat long.conf
server {
listen 80;
server_name a.com b.com c.com;
location / {
root /home/long/$host/;
index index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
cd /home/long
mkdir a.com b.com c.com
#对应目录下创建index.html文件
echo ‘test a.com‘ a.com/index.html
...
标签:test 技术 home code oca info src conf lang
原文地址:https://www.cnblogs.com/fuhai0815/p/14453521.html