`
zjnbshifox
  • 浏览: 312789 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
社区版块
存档分类
最新评论

nginx和joolma的rewrite配置

    博客分类:
  • LAMP
阅读更多
今天装了php,并且安装了joolma来学习,不过在joolma里面发布文章的时候,发现新文章找不到,都是404,看了一下文件的链接,都是这样的
http://192.168.253.131/index.php/joomlaville-overview
怀疑是rewrite规则的问题,网上找了一下看到
http://www.joomlagate.com/forum/topic-46226/
还有官方的文档
http://docs.joomla.org/Nginx

我只添加了try_files $uri $uri/ /index.php?q=$uri&$args;这一句就ok了
不过其他的官方配置也可以参考哦,呵呵

server {
        listen       80;
        server_name  localhost;
	rewrite_log on;
        #charset koi8-r;
	root   html;
	index index.php;
        #access_log  logs/host.access.log  main;

        location / {            
            #index  index.php index.html index.htm;
	    try_files $uri $uri/ /index.php?q=$uri&$args;
        }
	location ~ \.php$ {
            root html;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
            include fastcgi_params;
       } 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics