Subrion CMS Nginx Installation Issue

Discussion in 'Installation & Upgrades' started by jaisonriver, Aug 4, 2018.

  1. jaisonriver

    jaisonriver New Member

    I would like to try out Subrion CMS however, I've had issues getting this to work.
    Is Apache mod-rewrite required? Will this require the use of Apache? Can Nginx only be used as a reverse proxy with Subrion?
    Debian 8 - Nginx - MariaDB - PHP5-FPM - Subrion CMS
    Installation screen says everything looks good. Permissions and ownership and non-issue. I think this is a Nginx rewrite issue as I notice the url will become "/install/install/" upon submission however, the page remains the same as if you were to scroll to top. In the meantime I am going without a CMS so there is no pressing rush on this.
    If you are running Subrion CMS with Nginx I would appreciate your take on this situation. Thanks for reading.
    Nox ShowBox
    Mobdro
    Last edited: Aug 4, 2018
  2. Dayir_A.

    Dayir_A. Staff Member

  3. jio4gvoiceworld

    jio4gvoiceworld New Member

    Yes, Subrion CMS can be run on Nginx server. Here is the configuration that will work for 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 500502503504/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=$1;}

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

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires max;
    jio4gvoice
    log_not_found off;}}
    Anyhow, please note you might have issue with admin dashboard. You will need to update admin URL, change the default "admin" dashboard URL to any value, and clear tmp/ folder. This will work fine.

    Let me know if you need any assistance. I will be happy to help.
    Dayir_A. likes this.
  4. georgebilly

    georgebilly New Member

    root /home/u1/domains/example.com;
    index index.php;

    charset utf-8;
    location ~* ^/(favicon.ico|robots.txt)$ {
    allow all;
    access_log off;
    log_not_found off;
    }
    # route all requests to index.php
    location / {
    try_files $uri $uri/ /index.php?_p=$uri&$args;
    }
    location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-example.com.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params; showbox for pc
    }
    # route installation requests
    location /install/ {
    rewrite ^/install/(.*)$ /install/index.php?_p=$1;
    }
    # deny access to apache .htaccess files
    location ~ /\.ht
    {
    deny all;
    }
    # route admin dashboard requests
    location /admin/ {
    rewrite ^/admin/(.*)$ /index.php?_p=admin/$1&$args;
    }
    # cache static files
    location ~* ^.+.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|htm|html|js|css|mp3|swf|ico|flv|woff|ttf) {
    access_log off;
    expires 30d;
    }
  5. prasadabeysekara

    prasadabeysekara New Member

    Yes, Subrion CMS can be run on Nginx server. Here is the configuration that will work for nginx:

    Code (Text):
    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=$1;
        }

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

        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
            expires max;
            log_not_found off;
            }
    }
    http://luckypatcherdownloads.org/
    Last edited: Jan 1, 2019

Share This Page