File tree 4 files changed +36
-16
lines changed
4 files changed +36
-16
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ FROM hasholding/alpine-base:3.8
2
2
LABEL maintainer
"Levent SAGIROGLU <[email protected] >"
3
3
VOLUME /shared
4
4
RUN apk add nginx php7-fpm
5
- RUN mkdir -p /run/nginx
5
+ RUN mkdir -p /run/nginx
6
6
RUN sed -i 's/user = nobody/user = nginx/g' /etc/php7/php-fpm.d/www.conf
7
7
RUN sed -i 's/group = nobody/group = nginx/g' /etc/php7/php-fpm.d/www.conf
8
8
9
+ RUN echo "<?php phpinfo();" >/var/lib/nginx/html/info.php
10
+ RUN chmod 755 /var/lib/nginx/html/info.php
11
+
9
12
ENV PHP_CONF "/etc/php7/php-fpm.d"
10
- ENV NGINX_CONF "/etc/nginx/conf.d "
13
+ ENV CONF "/shared/local.conf "
11
14
12
15
EXPOSE 80 443
13
- RUN echo "<?php phpinfo();" >/var/lib/nginx/html/info.php
14
- RUN chmod 755 /var/lib/nginx/html/info.php
15
16
COPY entrypoint.sh /bin/entrypoint.sh
16
- COPY default .conf /etc/nginx/conf.d/
17
- ENTRYPOINT ["/bin/entrypoint.sh" ]
17
+ COPY local .conf /shared/local.conf
18
+ ENTRYPOINT ["/bin/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1
1
server {
2
- listen 80 default_server;
2
+ listen 80 default_server;
3
3
server_name _;
4
- root /var/lib/nginx/html/;
4
+
5
+
6
+ location / {
7
+ root /var/lib/nginx/html/;
8
+ index index.html index.htm index.php;
9
+ }
5
10
6
11
location ~ \.php$ {
7
12
@@ -10,10 +15,5 @@ server {
10
15
include /etc/nginx/fastcgi_params;
11
16
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
12
17
}
13
-
14
- error_page 500 502 503 504 /50x.html;
15
- location = /50x.html {
16
- root /var/lib/nginx/html/;
17
- }
18
-
19
- }
18
+
19
+ }
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
cp -u /etc/php7/php-fpm.d/www.conf ${PHP_CONF}
3
- cp -u /etc/nginx/conf.d/default.conf ${NGINX_CONF}
3
+ cp -u ${CONF} /etc/nginx/conf.d/
4
4
/usr/sbin/php-fpm7
5
5
/usr/sbin/nginx -g " daemon off;"
Original file line number Diff line number Diff line change
1
+ server {
2
+ listen 80;
3
+ server_name localhost;
4
+ root /var/lib/nginx/html/;
5
+
6
+ location ~ \.php$ {
7
+
8
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
9
+ fastcgi_pass localhost:9000;
10
+ include /etc/nginx/fastcgi_params;
11
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
12
+ }
13
+
14
+ error_page 500 502 503 504 /50x.html;
15
+ location = /50x.html {
16
+ root /var/lib/nginx/html/;
17
+ }
18
+
19
+ }
You can’t perform that action at this time.
0 commit comments