将我的Joomla网站从Apache迁移到NginX时,无法通过参考错误传递参数1

server_name www.domain.com上投放Joomla时出现此错误。如果我使用server_name test.domain.com

提供相同的Joomla目录,则没有错误

我有一个生产服务器,该生产服务器位于AWS EC2实例上,并且最近几年在Apache Web服务器下可以平稳运行,并且我正尝试将整个Joomla安装迁移到另一个环境中的NginX / PHP容器中。

所以我刚得到文件和数据库,然后开始测试。当我在www.dev.domain.com(开发环境以及test.domain.com(生产环境))上进行测试时,一切都很好。

当我转到www.domain.com时,问题弹出 我尝试了不同的server_names。 我试图提供一个index.html文件而不是原始的index.php文件,并且即使我将其手动放置在URL的末尾,或者即使我将其设置为nginx.conf作为索引也可以正常工作; Joomla后端(管理)可以在www.domain.com/administrator上正常运行 我在配置中尝试了server_name domain.com www.domain.com test.domain.com;,但是只有test.domain.com可以正常工作。

*在没有错误的情况下,网站可以正常运行

server {
    listen       80;
    server_name domain.com www.domain.com test.domain.com;
    server_name_in_redirect off;
    root /var/www/html;
    index index.php;
    access_log /logs/access.log;
    location ~ [^/]\.php(/|$) {
            proxy_cache my_cache;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;
            if (!-f $document_root$fastcgi_script_name) {
                    return 404;
            }
            fastcgi_param HTTP_Proxy "";
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            server_tokens off;
    try_files $uri $uri/ /index.php?$args;
    }
}

我希望该站点能够顺利运行,没有问题,因为在test.domain.com server_name下可以正常运行,但是出现了以下错误:

  

0无法通过引用传递参数1请尝试以下方法之一   页面:主页

fangguifenshiwodidi 回答:将我的Joomla网站从Apache迁移到NginX时,无法通过参考错误传递参数1

问题已解决。 我的Joomla安装中有一个已发布的虚拟域。由我的前任系统管理员或我公司的Web开发人员配置的设置。 因此,我通过my.domain.com/administrator控制台组件-> Virtual Domains取消发布了该文件,一切顺利 server_name www.domain.com

,

您应该将Joomla的虚拟域组件从1.3.1升级到1.3.2。 1.3.2版本适用于PHP7。

本文链接:https://www.f2er.com/3145171.html

大家都在问