rewrite 问题不明白
军哥请帮忙指点一下我的主站nginx 文件配置正确并正常工作.
但在子域名qun.baowang.com 配置如下,他是uchome程序, 我改如何启用rewrite功能? 除了COPY discuz.conf里面rewrite规则外(我已经测试增加到下面配置代码中但失败了,UCHOME后台也启用REWRITE),理论上还需要增加什么内容,请指点, 是不是直接把rewrite 代码放到nginx.conf文件中?
server
{
listen 80;
server_name qun.baowang.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/qun.baowang.com/;
include other.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
log_formatqun.baowang.com'$remote_addr - $remote_user [$time_local] $request '
'$status $body_bytes_sent $http_referer '
'$http_user_agent $http_x_forwarded_for';
access_logqun.baowang.com.log ;
}
[ 本帖最后由 spectrum 于 2010-5-31 02:58 编辑 ] 搞定了, 参考 http://www.discuz.net/viewthread.php?tid=1295013
页:
[1]