Skip to content
bpawel10 edited this page Jan 3, 2018 · 3 revisions
server {
    listen       80;
    server_name  devaac.example.com;
    root         /home/ubuntu/DevAAC/public_html;

    location / {
            index index.html index.php;
            try_files $uri $uri/ /index.html;
    }

    location /api {
            try_files $uri $uri/ /index.php?$args;
    }

    location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
            access_log  off;
            expires     max;
    }

    location ~ \.php$ {
        try_files               $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index           index.php;
        fastcgi_pass            unix:/var/run/php5-fpm_ubuntu.sock;
        fastcgi_param           SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include                 fastcgi_params;
        fastcgi_connect_timeout 3s;
        fastcgi_read_timeout    10s;
    }
}
Clone this wiki locally