Files
provisioning/ansible-2.0/roles/website/templates/nginx.conf.j2

26 lines
776 B
Django/Jinja

server {
listen {{ server_port }};
server_name {{ server_hostname }};
root {{ server_root }}/public;
access_log /var/log/nginx/{{ server_hostname }}_access.log;
error_log /var/log/nginx/{{ server_hostname }}_error.log;
index index.php index.html
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}