Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BETA RELEASE v3.3.2 b3
#6
I have it running on production server (Apache 2.4.9) for some time now (having backups ready anytime) without any problems so far.

(2014-04-17, 23:56:14)shawn_a Wrote: How about we get a generic nginx config up on github already?
What do you mean by that? Would I have to make a commit or something? I can't grasp how github is working, I don't understand it :/ I can post here a generic nginx setup that I've been using for every GS installation and some good willed soul can add it to github (whatever that requires).

Here's a generic nginx config for GetSimpleCMS. It contains the enlightened knowledge from posts found on this forum combined with best practices recommended by nginx gurus.
Code:
server {
    server_name    **SERVER NAMES (SPACE SEPARATED) GO HERE**;
    root        **ROOT OF YOUR WEB PAGE**;
    
    access_log    **PATH TO ACCESS LOG FILE**;
    error_log    **PATH TO ERROR LOG FILE**;

    index        index.php index.html index.htm;

    #Specify a charset
    charset        utf-8;

    # Custom 404 page
    # error_page    404 /404.html;

    # Block direct access to the XML files (except sitemap.xml)
    location ~* \.xml$ {
        deny all;
    }
    location ~* \.xml\.bak$    {
        deny all;
    }
    location = /sitemap.xml    {
        allow all;
    }

    # Block direct access to hidden files
    location ~ /\. {
        deny all;
    }

    # Prevent execution of php from uploads folder
    location ~* /uploads/.+\.php$ {
        deny all;
    }

    # Generic location. Rewrite works with and without pretty urls.
    location / {
        rewrite /?([A-Za-z0-9_-]+)/?$ /index.php?id=$1&$2 last;
    }

    # Handle special "admin" url.
    location /admin {
        try_files    $uri    $uri/    /admin/index.php?id=$uri&$args;
    }

    # Handle php files.
    location ~* \.php$ {
    
        # Prevent running php code from purposefully malformed urls.
        # Comment out the line below if your fastcgi handler doesn't reside on the same server
        try_files $uri =404;

        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        include fastcgi.conf;
    }
}
Reply


Messages In This Thread
RELEASE v3.3.2 b3 - by shawn_a - 2014-03-19, 06:38:03
RE: RELEASE v3.3.2 b2 - by shawn_a - 2014-04-11, 01:13:13
RE: RELEASE v3.3.2 b2 - by marrco - 2014-04-17, 18:23:37
RE: RELEASE v3.3.2 b2 - by shawn_a - 2014-04-17, 23:56:14
RE: RELEASE v3.3.2 b2 - by datiswous - 2014-04-21, 02:28:36
RE: RELEASE v3.3.2 b2 - by Everyone - 2014-04-21, 03:25:30
RE: RELEASE v3.3.2 b2 - by shawn_a - 2014-04-21, 09:13:05
RE: RELEASE v3.3.2 b2 - by Everyone - 2014-04-21, 19:24:26
RE: RELEASE v3.3.2 b2 - by marrco - 2014-04-30, 03:20:15
RE: RELEASE v3.3.2 b2 - by shawn_a - 2014-04-21, 23:31:59
RE: RELEASE v3.3.2 b3 - by Oleg06 - 2014-04-25, 04:51:58
RE: RELEASE v3.3.2 b3 - by shawn_a - 2014-04-25, 11:24:32
RE: RELEASE v3.3.2 b3 - by Oleg06 - 2014-04-25, 17:14:30
RE: RELEASE v3.3.2 b3 - by datiswous - 2014-04-25, 19:06:08
RE: RELEASE v3.3.2 b3 - by Oleg06 - 2014-04-25, 19:45:01
RE: RELEASE v3.3.2 b3 - by shawn_a - 2014-04-26, 05:01:00
RE: RELEASE v3.3.2 b3 - by Oleg06 - 2014-04-26, 05:08:42
RE: RELEASE v3.3.2 b3 - by shawn_a - 2014-04-26, 06:08:54
RE: RELEASE v3.3.2 b3 - by Oleg06 - 2014-04-26, 06:33:51
RE: RELEASE v3.3.2 b3 - by Everyone - 2014-05-02, 22:24:08
RE: RELEASE v3.3.2 b3 - by shawn_a - 2014-05-16, 10:43:50
RE: RELEASE v3.3.2 b3 - by datiswous - 2014-05-16, 19:47:12
RE: RELEASE v3.3.2 b3 - by n00dles101 - 2014-05-19, 07:58:16
RE: RELEASE v3.3.2 b3 - by Timbow - 2014-05-20, 07:19:03
RE: RELEASE v3.3.2 b3 - by shawn_a - 2014-05-20, 07:20:20
RE: RELEASE v3.3.2 b3 - by datiswous - 2014-05-21, 08:43:46



Users browsing this thread: 3 Guest(s)