Welcome to Centmin Mod Community
Become a Member

Joomla [TUT] Config Rewrite and Run in Joomla 3

Discussion in 'Blogs & CMS usage' started by computer19852007, Jul 9, 2014.

  1. computer19852007

    computer19852007 Member

    84
    8
    8
    Jun 25, 2014
    Ratings:
    +9
    Local Time:
    8:56 PM
    Centmin Mod 1.2.3-eva2000.06
    MariaDB 5.5.34
    Steps 1:

    Find igbinary.ini config file at /root/centminmod/php.d/igbinary.ini for .06 stable or for .07 and higher /etc/centminmod/php.d/igbinary.ini

    and comment out

    Code:
    session.serialize_handler=igbinary
    to

    Code:
    ;session.serialize_handler=igbinary
    if you do not as the steps 1, you can not Login Admin.

    Steps 2: Config ReWrite

    Code:
    server {
      server_name domain.com;
      server_name_in_redirect off;
    
    
    
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
    #ssi  on;
    
      access_log /home/nginx/domains/domain.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/domain.com/log/error.log;
    
      root /home/nginx/domains/domain.com/public;
    
      location / {
    
    #block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Shows file listing times as local time
      #autoindex_localtime on;
    
      # Enable for vBulletin usage WITHOUT vbSEO installed
      #try_files         / /index.php;
      try_files $uri $uri/ /index.php?q=$request_uri;
    
    
      }
    
    
      #pass php files to fastcgi
       location ~ \.php$
       {
                   fastcgi_pass 127.0.0.1:9000;
                   fastcgi_index index.php;
                   include /usr/local/nginx/conf/fastcgi_params;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          #set expires to 0 to stop caching of php files
          expires 0;
    
       }
    
      location ~ ^/
       {
       #set expires to 30d to cache static files
       expires 30d;
       #file doesn't exist, will need to be sent to php
       if (!-e $request_filename)
       {
       rewrite ^/(.*)$ /index.php?q=$1 last;
     
       }
       }
    
    
            # caching of files
            location ~* \.(ico|pdf|flv)$ {
                    expires 1y;
            }
    
            location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
                    expires 14d;
            }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
    
    Steps 3: Restart Nginx and you can try to test again

    Complete. Good Luck

    (I'm sorry, I come from Vietnam, and I write and speak English not well)


    Thanks you
     
    Last edited: Jul 17, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Thanks @computer19852007 for sharing and your English is fine :)

    fyi, might want to remove COLOR tags from within CODE block as they don't render ;)
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,074
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    3:56 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Yes please remove them so it is easier to read :)