forked from jshensh/phpReverseProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
38 lines (31 loc) · 947 Bytes
/
nginx.conf
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
server
{
listen 80;
#listen [::]:80;
server_name example.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/example.com;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
location /
{
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$)
{
try_files $uri $uri/ /index.php;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param PHP_VALUE "enable_post_data_reading=0";
include fastcgi.conf;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log off;
}