nginx配置域名
2016-09-02 10:54
316 查看
server {
listen 90;
server_name weishenghuo.com;
index index.html index.htm index.php;
root /xmisp/www/weishenghuo/public;
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?$1& last;
}
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 /xmisp/log/nginx/access/default.log;
}
listen 90;
server_name weishenghuo.com;
index index.html index.htm index.php;
root /xmisp/www/weishenghuo/public;
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?$1& last;
}
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 /xmisp/log/nginx/access/default.log;
}
相关文章推荐
- 一个关于if else容易迷惑的问题
- nginx代理指定目录
- PHP5.2.*防止Hash冲突拒绝服务攻击的Patch
- 深入理解PHP之匿名函数
- 访问Nginx发生SSL connection error的一种情况
- JSP/PHP基于Ajax的分页功能实现
- 关于PHP通过PDO用中文条件查询MySQL的问题。
- Nginx+Naxsi部署专业级Web应用防火墙
- 什么是设计模式
- CentOS 6.2实战部署Nginx+MySQL+PHP
- PHP数据库长连接mysql_pconnect的细节
- nginx中http核心模块的配置指令2
- nginx中http核心模块的配置指令3
- nginx中http核心模块的配置指令4
- nginx中http的fastcgi模块的配置指令1
- Php Installing An Expansion
- Nginx 学习笔记(一)
- rem : web app适配的秘密武器