gvaweb/gvaweb/webtasks/templates/vhost.nginx

32 lines
748 B
Nginx Configuration File

server {
server_name {{ domain }};
{%- if wildcard %}
server_name *.{{ domain|parentdomain }};
{%- endif %}
listen [::]:80;
access_log /var/log/nginx/{{ domain }}.access.log;
error_log /var/log/nginx/{{ domain }}.error.log;
client_max_body_size 20M;
gzip on;
gzip_types text/javascript application/x-javascript text/css;
root {{ docroot }};
index index.php index.html index.htm;
location ~ ^/(.+\.php)$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm-{{ user }}.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}