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;
}
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;
}
相关文章推荐
- nginx以日期分割日志文件
- 在浏览器里查看Nginx和PHP-FPM的运行状态
- Nginx 笔记与总结(6)Location:精准匹配
- Nginx配置
- Nginx配置文件nginx.conf中文详解
- Nginx配置导致无法上传大文件
- Mac下安装nginx
- 解决Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
- centos6.6设置samba和nginx访问用户家目录
- nginx限制某个IP同一时间段的访问次数
- nginx limit_req限速设置
- Nginx详细配置的备注说明
- add_header X-Frame-Options "SAMEORIGIN";NGINX
- Nginx在CDN加速之后,获取用户真实IP做并发访问限制的方法
- Ubuntu 使用apt-get安装nginx服务器
- Ubuntu 使用apt-get安装nginx服务器
- nginx下载限速
- nginx+php安全配置
- Nginx出现413 Request Entity Too Large错误解决方法
- ubuntu+nginx+php