全球主机交流论坛

标题: shinko你的一键不支持伪静态? [打印本页]

作者: aming    时间: 2010-5-29 18:20
标题: shinko你的一键不支持伪静态?
WP不支持

那要怎么加?
作者: cpuer    时间: 2010-5-29 18:23
标题: 回复 1# 的帖子
可能默认没有加入WordPress伪静态规则
作者: eudx    时间: 2010-5-29 18:25
location / {
if (-f $request_filename/index.html){
                rewrite (.*) $1/index.html break;
        }
if (-f $request_filename/index.php){
                rewrite (.*) $1/index.php;
        }
if (!-f $request_filename){
                rewrite (.*) /index.php;
        }
}

自己加啊
加到你的站点下面
在这下面就行
server
        {
                listen       80;
                server_name www.lnmp.org;
                index index.html index.htm index.php;
                root  /home/wwwroot;

                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }

[ 本帖最后由 eudx 于 2010-5-29 18:27 编辑 ]
作者: aming    时间: 2010-5-29 18:25
那要怎么加?
作者: taian    时间: 2010-5-29 18:26
.conf
作者: aming    时间: 2010-5-29 18:27
原帖由 eudx 于 2010-5-29 18:25 发表
location / {
if (-f $request_filename/index.html){
                rewrite (.*) $1/index.html break;
        }
if (-f $request_filename/index.php){
                rewrite (.*) $1/index.php;
        } ...



不知在那个位置,那里修改
作者: eudx    时间: 2010-5-29 18:29
直接学习 0.4的也可以啊
作者: aming    时间: 2010-5-29 18:29
原帖由 taian 于 2010-5-29 18:26 发表
.conf


郁闷,在 /root/lnmp/conf  看到有 wordpress.conf 文件,也有配置,但没效?
作者: eudx    时间: 2010-5-29 18:35
要重启NGINX呀 怎么可能没效呢。你没加载对吧。~
作者: lemss    时间: 2010-5-29 18:52
我记得有的吧
作者: shinko    时间: 2010-5-29 18:56
默认是没有启用的...

如果需要,请修改站点的配置文件..

例如:  修改imcat.conf
在include location.conf;
下面添加 include wordpress.conf;
作者: aming    时间: 2010-5-29 20:15
原帖由 shinko 于 2010-5-29 18:56 发表
默认是没有启用的...

如果需要,请修改站点的配置文件..

例如:  修改imcat.conf
在include location.conf;
下面添加 include wordpress.conf;


看明白了,谢谢啦

重启VPS先

[ 本帖最后由 aming 于 2010-5-29 20:23 编辑 ]
作者: shinko    时间: 2010-5-29 20:17
/usr/local/nginx/conf/servers/

里面有一个和你域名差不多的配置文件...例如 imcat.conf

用记事本打开,你就能看里面的内容....

也可以用vi /usr/local/nginx/conf/servers/imcat.conf

编辑...前提是要你懂vi命令
作者: mslxd    时间: 2010-5-29 20:20
有够新手的了,虽然我没折腾过,呵呵
作者: aming    时间: 2010-5-29 20:34
原帖由 shinko 于 2010-5-29 20:17 发表
/usr/local/nginx/conf/servers/

里面有一个和你域名差不多的配置文件...例如 imcat.conf

用记事本打开,你就能看里面的内容....

也可以用vi /usr/local/nginx/conf/servers/imcat.conf

编辑...前提是要你懂vi命 ...


谢哈。
刚才还是理解错误,修改了 lnmp/conf/imcat.conf  
作者: aming    时间: 2010-5-29 20:37
原帖由 shinko 于 2010-5-29 20:17 发表
/usr/local/nginx/conf/servers/

里面有一个和你域名差不多的配置文件...例如 imcat.conf

用记事本打开,你就能看里面的内容....

也可以用vi /usr/local/nginx/conf/servers/imcat.conf

编辑...前提是要你懂vi命令


就是说每个网站都要各个操作,能不能做一个总配置? 所有新的WP都可以




欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) Powered by Discuz! X3.4