File tree Expand file tree Collapse file tree 8 files changed +789
-3
lines changed Expand file tree Collapse file tree 8 files changed +789
-3
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ RUN usermod -u $USERID nginx
88RUN groupmod -o -g $GROUPID nginx
99
1010ADD nginx.conf /etc/nginx/nginx.conf
11- ADD default.conf /etc/nginx/conf.d/default.conf
11+ ADD default-dev .conf /etc/nginx/conf.d/default.conf
1212ADD m-hosts.conf /etc/nginx/conf.d/z-m-hosts.conf
13- ADD m-servers.conf /etc/nginx/conf.d/z-m-servers.conf
13+ ADD m-servers-dev .conf /etc/nginx/conf.d/z-m-servers.conf
1414ADD m-certs.conf /etc/nginx/conf.d/z-m-certs.conf
1515
1616# SSL
Original file line number Diff line number Diff line change 1+ FROM nginx:1.25
2+ ARG USERID=1000
3+ ARG GROUPID=1000
4+ RUN groupmod -g 999 dialout
5+
6+ # fix www-data user to avoid permissions issues
7+ RUN usermod -u $USERID nginx
8+ RUN groupmod -o -g $GROUPID nginx
9+
10+ ADD nginx.conf /etc/nginx/nginx.conf
11+ ADD default-prod.conf /etc/nginx/conf.d/default.conf
12+ ADD m-hosts.conf /etc/nginx/conf.d/z-m-hosts.conf
13+ ADD m-servers-prod.conf /etc/nginx/conf.d/z-m-servers.conf
14+ ADD m-certs.conf /etc/nginx/conf.d/z-m-certs.conf
15+
16+ # SSL
17+ ADD certs/* /etc/ssl/certs/
18+ ADD certs/* /etc/ssl/private/
19+ RUN whoami
20+ RUN chown -R -f nginx: /etc/ssl /var/cache/nginx /var/log/nginx /var/run /var/run/*
21+
22+ EXPOSE 443
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80;
3+ server_name _;
4+
5+ access_log /var/log/nginx/default.access.log main;
6+
7+ location / {
8+ root /var/www/htdocs/;
9+ index index.html index.htm index.php;
10+ }
11+
12+ #error_page 404 /404.html;
13+
14+ # redirect server error pages to the static page /50x.html
15+ #
16+ error_page 500 502 503 504 /50x.html;
17+ location = /50x.html {
18+ root /usr/share/nginx/html;
19+ }
20+
21+ # pass the PHP scripts to FastCGI server
22+ #
23+ location ~ \.php$ {
24+ set $php_host ${PHP_HOSTM2};
25+ fastcgi_pass ${php_host}:9000;
26+ fastcgi_index index.php;
27+ fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
28+ include fastcgi_params;
29+ }
30+
31+ # deny access to .htaccess files, if Apache's document root
32+ location ~ /\.ht {
33+ deny all;
34+ }
35+ }
36+
Original file line number Diff line number Diff line change 1+ server {
2+ listen 8080;
3+ server_name _;
4+
5+ access_log /var/log/nginx/default.access.log main;
6+
7+ location / {
8+ root /var/www/htdocs/;
9+ index index.html index.htm index.php;
10+ }
11+
12+ #error_page 404 /404.html;
13+
14+ # redirect server error pages to the static page /50x.html
15+ #
16+ error_page 500 502 503 504 /50x.html;
17+ location = /50x.html {
18+ root /usr/share/nginx/html;
19+ }
20+
21+ # pass the PHP scripts to FastCGI server
22+ #
23+ location ~ \.php$ {
24+ set $php_host ${PHP_HOSTM2};
25+ fastcgi_pass ${php_host}:9000;
26+ fastcgi_index index.php;
27+ fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
28+ include fastcgi_params;
29+ }
30+
31+ # deny access to .htaccess files, if Apache's document root
32+ location ~ /\.ht {
33+ deny all;
34+ }
35+ }
36+
You can’t perform that action at this time.
0 commit comments