PHP Classes

File: quanta-nginx.conf

Recommend this page to a friend!
  Classes of Aldo Tripiciano  >  Quanta CMS  >  quanta-nginx.conf  >  Download  
File: quanta-nginx.conf
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 3 years ago
Size: 1,393 bytes
 

Contents

Class file image Download
    server {
        # Select which port is your nginx server listening to.
        listen       8080;
        # Select server name / domain that your quanta site is using.
        server_name  your_quantasite;
        # Select the path of your quanta installation
        root /var/nwww/your_quantasite;

        index engine/boot.php;

        autoindex off;

        location /.well-known {
            rewrite ^/(.well-known)/acme-challenge/(.*) /acme-challenge/$2 break;
        }

        location /files {
            rewrite ^/(files)/(.*) /sites/$host/files/$2;
        }

        location /assets {
            rewrite ^/(assets)/(.*) /sites/$host/assets/$2;
        }

        location /tmp {
            rewrite ^/(tmp)/(.*) /engine/tmp/$host/files/$2;
        }

        location /thumbs {
            rewrite ^/(thumbs)/(.*) /engine/tmp/$host/thumbs/$2;
        }

        location / {
            try_files $uri $uri/ @rewrite;
            expires max;
        }


        location @rewrite {
            rewrite ^/(.*)$ /engine/boot.php;
        }

        location ~ \.php$ {
            include fastcgi_params;
            # If you are not using fpm, change those settings accordingly.
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_intercept_errors on;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
        }
    }
For more information send a message to info at phpclasses dot org.