VPS侦探论坛

 找回密码
 注册
查看: 8890|回复: 1

rewrite 问题不明白

[复制链接]
发表于 2010-5-31 02:53:07 | 显示全部楼层 |阅读模式

军哥请帮忙指点一下

我的主站nginx 文件配置正确并正常工作.


但在子域名qun.baowang.com 配置如下,他是uchome程序, 我改如何启用rewrite功能? 除了COPY discuz.conf里面rewrite规则外(我已经测试增加到下面配置代码中但失败了,UCHOME后台也启用REWRITE),理论上还需要增加什么内容,请指点, 是不是直接把rewrite 代码放到nginx.conf文件中?


  1. server
  2. {
  3.   listen       80;
  4.   server_name qun.baowang.com;
  5.   index index.html index.htm index.php default.html default.htm default.php;
  6.   root  /home/wwwroot/qun.baowang.com/;
  7.   include other.conf;
  8.   location ~ .*\.(php|php5)?$
  9.    {
  10.     fastcgi_pass  unix:/tmp/php-cgi.sock;
  11.     fastcgi_index index.php;
  12.     include fcgi.conf;
  13.    }
  14.   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  15.    {
  16.     expires      30d;
  17.    }
  18.   location ~ .*\.(js|css)?$
  19.    {
  20.     expires      12h;
  21.    }
  22.   log_format  qun.baowang.com  '$remote_addr - $remote_user [$time_local] $request '
  23.              '$status $body_bytes_sent $http_referer '
  24.              '$http_user_agent $http_x_forwarded_for';
  25.   access_log  qun.baowang.com.log ;
  26. }
复制代码

[ 本帖最后由 spectrum 于 2010-5-31 02:58 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2010-5-31 05:32:00 | 显示全部楼层
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-8 07:49 , Processed in 0.025125 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表