Skip to content

Commit ffee447

Browse files
committed
Switched to official nginx
1 parent 7eaa9fe commit ffee447

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

docker/nginx/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM dockerfile/nginx
1+
FROM nginx
22

3-
ADD conf/vhost.conf /etc/nginx/sites-available/default.tpl
3+
ADD conf/vhost.conf /opt/docker/vhost.conf
44
ADD entrypoint.sh /entrypoint.sh
55

66
ENTRYPOINT ["/entrypoint.sh"]

docker/nginx/conf/vhost.conf

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
server {
2-
listen 80;
2+
listen 80;
33

4-
server_name docker;
5-
access_log /dev/stdout;
6-
error_log /dev/stdout info;
4+
server_name docker;
5+
access_log /dev/stdout;
6+
error_log /dev/stdout info;
77

8-
root "<DOCUMENT_ROOT>";
9-
index index.php;
8+
root "<DOCUMENT_ROOT>";
9+
index index.php;
1010

11-
client_max_body_size 50m;
11+
client_max_body_size 50m;
1212

13-
location / {
14-
try_files $uri $uri/ /index.php?$query_string;
15-
}
13+
location / {
14+
try_files $uri $uri/ /index.php?$query_string;
15+
}
1616

17-
location ~* \.php$ {
18-
fastcgi_pass main:<FPM_PORT>;
19-
include fastcgi.conf;
20-
include fastcgi_params;
21-
fastcgi_param TYPO3_CONTEXT "<TYPO3_CONTEXT>";
22-
fastcgi_param FLOW_CONTEXT "<FLOW_CONTEXT>";
23-
fastcgi_param FLOW_REWRITEURLS "<FLOW_REWRITEURLS>";
24-
fastcgi_read_timeout 300;
25-
}
17+
location ~ \.php$ {
18+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
19+
fastcgi_pass main:<FPM_PORT>;
20+
include fastcgi_params;
21+
22+
fastcgi_param SCRIPT_FILENAME $request_filename;
23+
fastcgi_param TYPO3_CONTEXT "<TYPO3_CONTEXT>";
24+
fastcgi_param FLOW_CONTEXT "<FLOW_CONTEXT>";
25+
fastcgi_param FLOW_REWRITEURLS "<FLOW_REWRITEURLS>";
26+
fastcgi_read_timeout 300;
27+
}
2628
}

0 commit comments

Comments
 (0)