您的位置:首页 > 运维架构 > Nginx

nginx 多域名绑定

2015-08-04 09:53 405 查看
server {
listen 80;
server_name ~^(?<subdomain>.+)\.youwebname\.com$;
index index.html index.htm index.php;
root /wwwroot/$subdomain;
error_page 404 = /404.html;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log /alidata/log/nginx/access/hn.log;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: