-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patharonode.vhost
46 lines (41 loc) · 1.21 KB
/
aronode.vhost
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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/php__PHPVERSION__-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;
}
}