diff --git a/apache/conf/srem.conf b/apache/conf/srem.conf new file mode 100644 index 0000000..87971f5 --- /dev/null +++ b/apache/conf/srem.conf @@ -0,0 +1,29 @@ + + ServerName srem.psi.ch + DocumentRoot /var/www/srem + + Options +ExecCGI +Includes + AddHandler cgi-script .pl .cgi + AddHandler server-parsed .shtml + AddOutputFilter INCLUDES .shtml + + + Options +Includes + AllowOverride None + Require all granted + + + + Options +Includes + AllowOverride None + Require all granted + + + # Explicit CGI directory + ScriptAlias /cgibin/ /var/www/srem/cgibin/ + + Options +ExecCGI -Includes + Require all granted + + + diff --git a/conf.d/srem.conf b/conf.d/srem.conf new file mode 100644 index 0000000..87922d2 --- /dev/null +++ b/conf.d/srem.conf @@ -0,0 +1,30 @@ +server { + listen 80; + server_name srem.psi.ch; + + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name srem.psi.ch; + + ssl_certificate /etc/nginx/certs/lx-docker-dmz-01.psi.ch.crt; + ssl_certificate_key /etc/nginx/private/lx-docker-dmz-01.psi.ch.key; + + access_log /var/log/nginx/srem.access.log; + error_log /var/log/nginx/srem.error.log; + + # Proxy EVERYTHING to the Apache container + location / { + proxy_pass http://apache_app:80; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + # Important for CGI apps + proxy_buffering off; + } +} + diff --git a/docker-compose.yaml b/docker-compose.yaml index 903cbe7..ef9d253 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -29,8 +29,8 @@ services: volumes: - /opt/webcontent/DMZ/rfmwtools:/var/www/rfmwtools:ro - /opt/webcontent/DMZ/fluid-eos:/var/www/fluid-eos:rw - - ./apache/conf/rfmwtools.conf:/etc/apache2/sites-enabled/rfmwtools.conf:ro - - ./apache/conf/fluid-eos.conf:/etc/apache2/sites-enabled/fluid-eos.conf:ro + - /mount/srem/webhosting:/var/www/srem:rw + - ./apache/conf:/etc/apache2/sites-enabled:ro networks: - backend