diff --git a/conf/apache.conf b/conf/apache.conf index 3b5053e459d23..5889cc2959262 100644 --- a/conf/apache.conf +++ b/conf/apache.conf @@ -45,8 +45,9 @@ LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-A ExtendedStatus On - SetHandler server-status - Require all granted + SetHandler server-status + Require ip 127.0.0.1 + Require ip 172.30.0.0/16 diff --git a/conf/nginx.conf b/conf/nginx.conf index d06f78ed9b17f..46c0cb20db0f6 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -107,6 +107,13 @@ server { proxy_pass http://$backend/cgi/display.pl?$request_uri; } + location /nginx_status { + stub_status; + allow 127.0.0.1; # localhost + allow 172.30.0.0/16; # docker IP range + deny all; # deny all other hosts + } + location /cgi/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -168,6 +175,13 @@ server { proxy_pass http://$backend/cgi/display.pl?$request_uri; } + location /nginx_status { + stub_status; + allow 127.0.0.1; # localhost + allow 172.30.0.0/16; # docker IP range + deny all; # deny all other hosts + } + location /cgi/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/docker/prod.yml b/docker/prod.yml index 196c1afee69b2..48072683e3a91 100644 --- a/docker/prod.yml +++ b/docker/prod.yml @@ -27,3 +27,10 @@ volumes: external: true product_images: external: true + +networks: + webnet: + driver: bridge + ipam: + config: + - subnet: 172.30.0.0/16