Skip to content

Commit b40b70e

Browse files
authored
Update nginx.conf.tpl
1 parent 8bf2e12 commit b40b70e

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

base/nginx.conf.tpl

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ events {
77
}
88

99
http {
10-
1110
sendfile on;
1211
tcp_nopush on;
1312
tcp_nodelay on;
@@ -30,26 +29,26 @@ http {
3029
#include /etc/nginx/sites-enabled/*;
3130
3231
server {
33-
listen 80 default_server;
34-
root $NGINX_WEB_ROOT;
35-
36-
location / {
37-
try_files $uri $NGINX_PHP_FALLBACK$is_args$args;
38-
}
39-
location ~ $NGINX_PHP_LOCATION {
40-
fastcgi_pass unix:$PHP_SOCK_FILE;
41-
fastcgi_split_path_info ^(.+\.php)(/.*)$;
42-
include fastcgi_params;
43-
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
44-
fastcgi_param DOCUMENT_ROOT $realpath_root;
45-
46-
internal;
47-
}
48-
49-
# return 404 for all other php files not matching the front controller
50-
# this prevents access to other php files you don't want to be accessible.
51-
location ~ \.php$ {
52-
return 404;
53-
}
54-
}
32+
listen 80 default_server;
33+
root $NGINX_WEB_ROOT;
34+
35+
location / {
36+
try_files $uri $NGINX_PHP_FALLBACK$is_args$args;
37+
}
38+
location ~ $NGINX_PHP_LOCATION {
39+
fastcgi_pass unix:$PHP_SOCK_FILE;
40+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
41+
include fastcgi_params;
42+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
43+
fastcgi_param DOCUMENT_ROOT $realpath_root;
44+
45+
internal;
46+
}
47+
48+
# return 404 for all other php files not matching the front controller
49+
# this prevents access to other php files you don't want to be accessible.
50+
location ~ \.php$ {
51+
return 404;
52+
}
53+
}
5554
}

0 commit comments

Comments
 (0)