From 192f21f70c9602d742c9e090c13c0db6dd30dfc1 Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Tue, 5 May 2020 00:36:26 +0200 Subject: [PATCH] Fixes in the proxy default behaviour for both standard and SSL connections. --- services/proxy/000-default.conf | 12 +++--- services/proxy/001-proxy.conf | 66 --------------------------------- services/proxy/default-ssl.conf | 8 ++-- 3 files changed, 10 insertions(+), 76 deletions(-) diff --git a/services/proxy/000-default.conf b/services/proxy/000-default.conf index 77b0397..2d703eb 100644 --- a/services/proxy/000-default.conf +++ b/services/proxy/000-default.conf @@ -9,8 +9,8 @@ #ServerName www.example.com ServerAdmin webmaster@backfrontend - ProxyPass / http://cloud:8080/ - ProxyPassReverse / http://cloud:8080/ + ProxyPass / http://webapp:8080/ + ProxyPassReverse / http://webapp:8080/ # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. @@ -18,8 +18,8 @@ # modules, e.g. #LogLevel info ssl:warn - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined + #ErrorLog ${APACHE_LOG_DIR}/error.log + #CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to @@ -41,8 +41,8 @@ #RewriteCond %{HTTP_HOST} !=localhost #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} - ProxyPass / http://cloud:8080/ - ProxyPassReverse / http://cloud:8080/ + ProxyPass / http://webapp:8080/ + ProxyPassReverse / http://webapp:8080/ </VirtualHost> diff --git a/services/proxy/001-proxy.conf b/services/proxy/001-proxy.conf index e5de80c..052a1a6 100644 --- a/services/proxy/001-proxy.conf +++ b/services/proxy/001-proxy.conf @@ -24,71 +24,5 @@ </VirtualHost> - -#--------------------------- -# Localhost -#--------------------------- - -# Non-SSL -<VirtualHost *:80> - - ServerName localhost - ProxyPass / http://webapp:8080/ - ProxyPassReverse / http://webapp:8080/ - -</VirtualHost> - -# SSL -<VirtualHost *:443> - - ServerName localhost - - SSLEngine on - - SSLCertificateFile /root/certificates/rosetta_platform/rosetta_platform.crt - SSLCertificateKeyFile /root/certificates/rosetta_platform/rosetta_platform.key - SSLCACertificateFile /root/certificates/rosetta_platform/rosetta_platform.ca-bundle - #SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem - #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key - #SSLCACertificateFile /etc/ssl/certs/ca-certificates.crt - - ProxyPass / http://webapp:8080/ - ProxyPassReverse / http://webapp:8080/ - -</VirtualHost> - - -#--------------------------- -# Anything -#--------------------------- - -# Non-SSL -<VirtualHost *:80> - - ProxyPass / http://webapp:8080/ - ProxyPassReverse / http://webapp:8080/ - -</VirtualHost> - -# SSL -<VirtualHost *:443> - - SSLEngine on - - SSLCertificateFile /root/certificates/rosetta_platform/rosetta_platform.crt - SSLCertificateKeyFile /root/certificates/rosetta_platform/rosetta_platform.key - SSLCACertificateFile /root/certificates/rosetta_platform/rosetta_platform.ca-bundle - #SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem - #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key - #SSLCACertificateFile /etc/ssl/certs/ca-certificates.crt - - ProxyPass / http://webapp:8080/ - ProxyPassReverse / http://webapp:8080/ - -</VirtualHost> - - - - # vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/services/proxy/default-ssl.conf b/services/proxy/default-ssl.conf index 013e4b9..6a67b5b 100644 --- a/services/proxy/default-ssl.conf +++ b/services/proxy/default-ssl.conf @@ -2,8 +2,8 @@ <VirtualHost _default_:443> ServerAdmin webmaster@localhost - ProxyPass / http://cloud:8080/ - ProxyPassReverse / http://cloud:8080/ + ProxyPass / http://webapp:8080/ + ProxyPassReverse / http://webapp:8080/ # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. @@ -11,8 +11,8 @@ # modules, e.g. #LogLevel info ssl:warn - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined + #ErrorLog ${APACHE_LOG_DIR}/error.log + #CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to -- GitLab