dolphin 发表于 2013-9-23 12:02:16

LNMP的rewrite规则到底怎么改啊

我的程序在本地的phpstudy中运行的很好

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

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

我的配置文件如下:
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_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;
                        }

                access_log off;
        }


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

到底要怎么改呢?

dolphin 发表于 2013-9-23 23:54:17

:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(:'(
页: [1]
查看完整版本: LNMP的rewrite规则到底怎么改啊