Learn about Centmin Mod LEMP Stack today
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

    53
    5
    8
    Jun 25, 2014
    Ratings:
    +5
    Local Time:
    12:12 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
    • Like Like x 3
  2. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,751
    Local Time:
    3:12 PM
    Nginx 1.13.x
    MariaDB 5.5
    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 ;)
     
    • Like Like x 1
  3. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    8:12 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Yes please remove them so it is easier to read :)
     
    • Like Like x 1