Skip to content

Commit ab4d9c7

Browse files
committed
DevOps: Updated docker setup - fix nginx ips
1 parent 5429e9f commit ab4d9c7

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

.docker/nginx.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ events {
77
worker_connections 1024;
88
}
99

10-
1110
http {
1211
proxy_temp_path /tmp/proxy_temp;
1312
client_body_temp_path /tmp/client_temp;
@@ -18,7 +17,7 @@ http {
1817
include /etc/nginx/mime.types;
1918
default_type application/octet-stream;
2019

21-
set_real_ip_from 172.16.0.0/8;
20+
set_real_ip_from 172.16.0.0/16;
2221
real_ip_recursive on;
2322
real_ip_header X-Forwarded-For;
2423

.docker/templates/default.conf.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ server {
66

77
client_max_body_size ${NGINX_MAX_BODY_SIZE};
88

9+
# This also needs to be set in the single server tag and not only in http.
10+
set_real_ip_from 172.16.0.0/16;
11+
real_ip_recursive on;
12+
real_ip_header X-Forwarded-For;
13+
914
location / {
1015
# try to serve file directly, fallback to index.php
1116
try_files $uri /index.php$is_args$args;

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
COMPOSE_PROJECT_NAME=itksites
2-
COMPOSE_DOMAIN=itksites.local.itkdev.dk
2+
#COMPOSE_DOMAIN=itksites.local.itkdev.dk
3+
COMPOSE_DOMAIN=sites.itkdev.dk
34

45
# In all environments, the following files are loaded if they exist,
56
# the latter taking precedence over the former:

0 commit comments

Comments
 (0)