Subrion CMS Nginx 安装问题

Subrion CMS Nginx Installation Issue

我想试用 Subrion CMS,但是我遇到了一些问题。

是否需要 Apache mod-rewrite?这需要使用 Apache 吗? Nginx 只能用作 Subrion 的反向代理吗?

Debian 8 - Nginx - MariaDB - PHP5-FPM - Subrion CMS

安装屏幕显示一切正常。权限和所有权并无问题。我认为这是一个 Nginx 重写问题,因为我注意到 url 将在提交后变为“/install/install/”,但是页面保持不变,就像您滚动到顶部一样。与此同时,我将不使用 CMS,因此没有紧迫感。

如果您是 运行 使用 Nginx 的 Subrion CMS,我将不胜感激您对这种情况的看法。感谢阅读。

是的,Subrion CMS 可以在 Nginx 服务器上 运行。这是适用于 nginx 的配置:

server {
    listen      80; # make sure there is no conflict with apache server listening on port 80
    server_name subrion_domain.com; # your website domain name

    root        /var/www/subrion; # absolute path to your subrion core files
    index       index.php;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

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

    error_page  404  /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location /install/ {
        rewrite ^/install/(.*)$ /install/index.php?_p=;
    }

    # deny access to apache .htaccess files
    location ~ /\.ht
    {
        deny all;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
        }
}

无论如何,请注意您的管理仪表板可能有问题。您将需要更新管理员 URL,将默认 "admin" 仪表板 URL 更改为任意值,并清除 tmp/ 文件夹。这会很好用。

如果您需要任何帮助,请告诉我。我很乐意提供帮助。