Skip to content

Nginx Support

Fariz Luqman edited this page Feb 1, 2017 · 2 revisions

Nginx is supported since version 0.3.2

Example nginx.conf

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       8082;
        server_name  localhost;

        # root of the DSS framework
        root /Applications/MAMP/htdocs/dss_github/framework;

        index index.html index.htm index.php;

        # if file not exist, rewrite to index.php
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }

        # handle .php file to PHP/HHVM fastcgi running on port 9000, change this to your own handler
        location ~ \.php$ {
            try_files $uri /index.php =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
        
        
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

PHP

Damn Stupid Simple (DSS) requires at least PHP 5.6

HHVM

see HHVM support

Please report for any bug here https://github.com/damnstupidsimple/framework/issues

Visit our website for tutorials: stupidlysimple.github.io

Clone this wiki locally