-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
67 lines (52 loc) · 1.59 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
server {
listen 80;
server_name ${ADMIN_HOST};
root /var/www/www_admin;
index index.php;
set $auth_basic off;
if (-f $document_root/.htpasswd) {
set $auth_basic "Wuhu Admin Login";
}
auth_basic $auth_basic;
auth_basic_user_file $document_root/.htpasswd;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
}
}
server {
listen 80;
server_name ${PARTY_HOST};
client_max_body_size 500m;
root /var/www/www_party;
index index.php;
location /entries/ {
alias /var/www/entries_public/;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
}
}