Merge pull request #11 from alex3305/nginx-conf

Nginx Configuration
This commit is contained in:
Matt 2014-10-20 08:53:20 -04:00
commit 3b51ec5000

34
build/nginx.conf Normal file
View File

@ -0,0 +1,34 @@
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www;
index index.php index.html;
# Make site accessible from http://localhost/
server_name localhost;
location / {
try_files $uri $uri/ /index.php?$args;
}
location /api {
if (!-e $request_filename) {
rewrite ^(.*)$ /api/api.php last; break;
}
}
location /api/taskboard.db {
rewrite ^(.*)$ /api/api.php last; break;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
}