Joomla nginx 配置

来源:互联网 发布:淘宝750海报 编辑:程序博客网 时间:2024/05/17 06:16

joomla在nginx服务器上,设置 短连 时,需要修改nginx配置文件:nginx/conf/nginx.conf
添加以下内容:
如果网站为根目录时:

location / {                try_files $uri $uri/ /index.php?q=$uri&$args;        }

若果为二级目录时:

location /cn/ {                try_files $uri $uri/ /cn/index.php?q=$uri&$args;        }

或者用 rewrite:

location /cn/ {         if (!-e $request_filename) {                      rewrite ^/cn/(.*)$  /cn/index.php?q=$uri&$args;                }          }
0 0