configs for several sites in apache with ssl
- by elCapitano
i need to secure two different sites in apache. One of them should only be a proxy for a different server which is running on port 8069.
Now one (which is natively included in apache) runs with SSL:
<VirtualHost *:443>
ServerName 192.168.1.20
SSLEngine on
SSLCertificateFile /etc/ssl/erp/oeserver.crt
SSLCertificateKeyFile /etc/ssl/erp/oeserver.key
DocumentRoot /var/www/cloud
ServerPath /cloud/
#CustomLog /var/www/logs/ssl-access_log combined
#ErrorLog /var/www/logs/ssl-error_log
</VirtualHost>
The other one is not running and even not registered. When i try to access it, i get an exception (ssl_error_rx_record_too_long):
<VirtualHost *:443>
ServerName 192.168.1.20
ServerPath /erp/
SSLEngine on
SSLCertificateFile /etc/ssl/erp/oeserver.crt
SSLCertificateKeyFile /etc/ssl/erp/oeserver.key
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPass / http://127.0.0.1:8069/
ProxyPassReverse / http://127.0.0.1:8069
RewriteEngine on
RewriteRule ^/(.*) http://127.0.0.1:8069/$1 [P]
RequestHeader set "X-Forwarded-Proto" "https"
SetEnv proxy-nokeepalive 1
</VirtualHost>
My whish is the following configuration:
192.168.1.20 ->> unsecured local path to website
192.168.1.20/cloud/ ->> secured local documentpath from cloud
192.168.1.20/erp/ ->> secured proxy on port 80 for http://192.168.1.20:8069
how is this possible? is this even possible? perhaps cloud.192.168.1.20 and erp.192.168.1.20 is better?!
Thank you