joomla版本3.5
服务器环境:nginx1.8+php7
[font="]nginx下伪静态一直不成功,试了网上很多的伪静态规则,都没法用
[font="]
https://docs.joomla.org/Nginx
官方这个伪静态规则说要改
[font="]PATH_ON_SERVER,请问在哪里改,我对niginx不熟悉...
望大虾分享一二..
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
-------------------------
[警告] nginx-1.8 配置Rewrite规则错误,请查检改正。
nginx: [emerg] "server" directive is not allowed here in /home/wwwroot/joomla/rewrite/joomla.conf:1
nginx: configuration file /usr/local/nginx-1.8/conf/nginx.conf test failed
server {
        listen 80;
        server_name 我的域名;
        server_name_in_redirect off;
        access_log /var/log/nginx/localhost.access_log;
        error_log /var/log/nginx/localhost.error_log info;
        root home/wwwroot/joomla/; 路径这样对吗
        index index.php index.html index.htm default.html default.htm;
        # Support Clean (aka Search Engine Friendly) URLs
        location / {
                try_files $uri $uri/ /index.php?$args;
        }
        # deny running scripts inside writable directories
        location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
                return 403;
                error_page 403 /403_error.html;
        }
        location ~ \.php$ {
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi.conf;
        }
        # caching of files 
        location ~* \.(ico|pdf|flv)$ {
                expires 1y;
        }
        location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
                expires 14d;
        }
}
-------------------------
-------------------------