用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2237|回复: 1
收起左侧

LNMP的rewrite规则到底怎么改啊

[复制链接]
发表于 2013-9-23 12:02:16 | 显示全部楼层 |阅读模式
我的程序在本地的phpstudy中运行的很好

上传到服务器上后除了首页都出现404错误

网上说是因为nginx的rewrite规则不正确

我的配置文件如下:
PHP复制代码
server
        {
                listen       80;
                server_name fm.hbdx.cc;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/fm.hbdx.cc;
 
                include none.conf;
                location ~ .*\.(php|php5)?$
                        {
                                try_files $uri =404;
                                fastcgi_pass  unix:/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;
                        }
 
                access_log off;
        }
 
复制代码


网上搜索到的我试了怎么都不行啊

到底要怎么改呢?
 楼主| 发表于 2013-9-23 23:54:17 | 显示全部楼层
:'(

本版积分规则