server {
listen
80
;
server_name ssdr.info www.ssdr.info;
...
}
3、以*通配符结束的字符串:server {
listen
80
;
server_name *.ssdr.info;
...
}
4、匹配正则表达式:server {
listen
80
;
server_name www.*;
...
}
server {
listen
80
;
server_name ~^(?.+)\.howtocn\.org$;
...
}
server
{
listen
80
;
server_name ~^(www\.)?(.+)$;
index index.php index.html;
root /data/wwwsite/$
2
;
}
server{
listen
80
default
;
server_name _;
return
403
;
}
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛