Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (41 sloc) 1.2 KB
server {
listen 80 default_server;
server_name __DOMAIN__ www.__DOMAIN__;
root __WEBROOT__/__DOMAIN__;
if ($request_method !~ ^(GET|HEAD|POST|PUT|DELETE)$) {
return 444;
}
index index.php index.html index.htm;
charset utf-8;
# do NOT show client error pages
error_page 401 403 404 /404.html;
# prevent nginx warnings
client_body_buffer_size 10M;
client_max_body_size 10M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
sendfile off;
location ~ \.php$ {
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# increase buffers: https://gist.github.com/magnetikonline/11312172
fastcgi_buffers 8 4k; # max 32KB
fastcgi_read_timeout 180;
}
location ~ /\.ht {
deny all;
}
location /nginx {
# Turn on stats
stub_status on;
access_log off;
# only allow access from ... #
allow 127.0.0.1;
deny all;
}
}