Nginx Support

Nginx's Avatar

Nginx

18 May, 2014 06:46 PM

Need to install this on a nginx server, but can't seem to find documentation for that anywhere.

What rewrite rules do i need?

  1. Support Staff 1 Posted by Uldis on 19 May, 2014 06:58 AM

    Uldis's Avatar

    Hi,
    haven't tested this converter http://winginx.com/en/htaccess may this could help.
    Apache rules you will find here: https://github.com/berta-cms/berta/blob/master/htaccess

  2. Uldis closed this discussion on 19 May, 2014 06:58 AM.

  3. Nginx re-opened this discussion on 19 May, 2014 11:59 AM

  4. 2 Posted by Nginx on 19 May, 2014 11:59 AM

    Nginx's Avatar

    Here is the Nginx rules that finally got the Berta CMS working under nginx.
    I think all is well now.

        location / {
                try_files $uri @rewrite;
        }
    
        location /engine {
                rewrite ^ /engine/index.php;
        }
    
        # This block will catch static file requests, such as images, css, js
        # The ?: prefix is a 'non-capturing' mark, meaning we do not require
        # the pattern to be captured into $1 which should help improve performance
        location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
                # Some basic cache-control for static files to be sent to the browser
                expires max;
                add_header Pragma public;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        }
    
        location @rewrite {
                rewrite ^ /index.php;
        }
    
  5. Support Staff 3 Posted by Uldis on 19 May, 2014 01:47 PM

    Uldis's Avatar

    Thanks for sharing this info, hopefully this will be useful for someone.

  6. Uldis closed this discussion on 19 May, 2014 01:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac