Skip to content

Commit 8cf1a12

Browse files
committed
Update and fix nginx vhost configuration file
1 parent 6881bdb commit 8cf1a12

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
PHP Docker Boilerplate Changelog
22
==================================
33

4+
5.1.3 - 2016-05-25
5+
------------------
6+
- Fix nginx vhost configuration (modular WebDevOps image design)
7+
48
5.1.2 - 2016-05-25
59
------------------
610
- Fix typo in Docker image names (duplicate -dev)

provision/roles/boilerplate-main/templates/nginx/vhost.conf.j2

+2-26
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ server {
99
listen 80;
1010

1111
server_name {{ vhost.serverName }} {{ vhost.serverAlias }};
12+
1213
access_log /dev/stdout;
1314
error_log /dev/stdout info;
1415

@@ -17,19 +18,6 @@ server {
1718

1819
client_max_body_size 50m;
1920

20-
location / {
21-
try_files $uri $uri/ /{{ vhost.documentIndex|default('<DOCUMENT_INDEX>') }}?$query_string;
22-
}
23-
24-
location ~ \.php$ {
25-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
26-
fastcgi_pass php;
27-
include fastcgi_params;
28-
29-
fastcgi_param SCRIPT_FILENAME $request_filename;
30-
fastcgi_read_timeout 1000;
31-
}
32-
3321
include /opt/docker/etc/nginx/vhost.common.d/*.conf;
3422
}
3523

@@ -41,6 +29,7 @@ server {
4129
listen 443;
4230

4331
server_name {{ vhost.serverName }} {{ vhost.serverAlias }};
32+
4433
access_log /dev/stdout;
4534
error_log /dev/stdout info;
4635

@@ -49,19 +38,6 @@ server {
4938

5039
client_max_body_size 50m;
5140

52-
location / {
53-
try_files $uri $uri/ /{{ vhost.documentIndex|default('<DOCUMENT_INDEX>') }}?$query_string;
54-
}
55-
56-
location ~ \.php$ {
57-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
58-
fastcgi_pass php;
59-
include fastcgi_params;
60-
61-
fastcgi_param SCRIPT_FILENAME $request_filename;
62-
fastcgi_read_timeout 1000;
63-
}
64-
6541
include /opt/docker/etc/nginx/vhost.common.d/*.conf;
6642
include /opt/docker/etc/nginx/vhost.ssl.conf;
6743
}

0 commit comments

Comments
 (0)