尝试编辑草稿页时,SilverStripe 4 / NGINX重定向到404

问题描述

我得到了一个N​​GNIX服务器,该服务器以前仅安装了Ubuntu 18.04和NGNIX,并用于呈现静态HTML站点

我已经安装了PHPMysqLi ect并配置了网站可用文件来启动并运行网站。将数据库从开发站点导入到实时站点后,除一个错误外,该站点运行正常,完全正常。

如果在“拆分模式”或“预览模式”下单击草稿页,则会重定向管理员中的“找不到页面”。如果我切换到“编辑模式”,则一切正常。 发布草稿页后,就可以在“拆分模式”或“预览模式”下查看它了。

我想知道它是否与我的NGNIX配置有关。我使用以下链接配置了网站可用/文件https://www.nginx.com/resources/wiki/start/topics/recipes/silverstripe/#recipe

这是我的ngnix网站可用的配置文件

    server {
            include mime.types;
            default_type  application/octet-stream;
            #listen 80 default_server;
            #listen [::]:80 default_server;
    
            listen 443 ssl default_server;
            listen [::]:443 ssl default_server;
    
            ssl        on;
            ssl_certificate         /etc/ssl/certs/certificate.pem;
            ssl_certificate_key     /etc/ssl/private/key.key;
    
            root ****************
    
            # Add index.PHP to the list if you are using PHP
            index index.PHP index.html index.htm index.Nginx-debian.html;
    
            server_name ****************;
    
            location / {
                    # First attempt to serve request as file,then
                    # as directory,then fall back to displaying a 404.
                    try_files $uri /index.PHP?query_string;
            }
            error_page 404 /assets/error-404.html;
            error_page 500 /assets/error-500.html;
    
            # see caveats
            error_page 502 /assets/error-500.html;
            error_page 503 /assets/error-500.html;
    
            location ^~ /assets/ {
                    sendfile on;
                    try_files $uri =404;
            }
    
            location /index.PHP {
                    fastcgi_buffer_size 32k;
                    fastcgi_busy_buffers_size 64k;
                    fastcgi_buffers 4 32k;
                    fastcgi_keep_conn on;
                    fastcgi_pass   127.0.0.1:9000;
                    fastcgi_index  index.PHP;
                    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include        fastcgi_params;
            }
    
            # pass PHP scripts to FastCGI server
            #
            location ~ \.PHP$ {
                    include snippets/fastcgi-PHP.conf;
    
                    # With PHP-fpm (or other unix sockets):
                    fastcgi_pass unix:/var/run/PHP/PHP7.2-fpm.sock;
                    # With php-cgi (or other tcp sockets):
            #       fastcgi_pass 127.0.0.1:9000;
            }
    
            # deny access to .htaccess files,if Apache's document root
            # concurs with Nginx's one
            #
            location ~ /\.ht {
                    deny all;
            }
    }

当我导航到/install.PHP时,没有警告或错误

关于什么可能导致这种情况的任何线索?让我知道是否需要更多信息。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)