I have several applications under Tomcat server. So I want a subdomain for each application. So, if a user want to access an application, has to put https://app1.domain.com... to access Tomcat application domain.com/app1/, domain.com/app2/ each.
I have succesfully configured apache with a wildcard certificate to use SSL. But not redirecting when accessing subdomain to each appplication. Just getting a ERR_TOO_MANY_REDIRECTS error.
Here are the ssl.conf file:
<VirtualHost 10.0.0.1:443> ServerAdmin [email protected] DocumentRoot "/var/www/html" ServerName www.domain.com ServerAlias domain.com ErrorLog logs/ssl_error.log DirectoryIndex index.html SSLEngine on SSLProtocol All +TLSv1.2 -SSLv2 -SSLv3 SSLCertificateFile /opt/certs/domain.com.crt SSLCertificateKeyFile /opt/certs/domain.com.key SSLCertificateChainFile /opt/certs/domain.com.intermediate.crt <Directory "/var/www/html"> Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost 10.0.0.1:443> DocumentRoot "/var/www/html/app1" ServerName app1.domain.com UseCanonicalName Off DirectoryIndex index.html ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/app1/ ProxyPassReverse / http://localhost:8080/app1/ SSLEngine On SSLProtocol All +TLSv1.2 -SSLv2 -SSLv3 SSLCertificateFile /opt/certs/domain.com.crt SSLCertificateKeyFile /opt/certs/domain.com.key SSLCertificateChainFile /opt/certs/domain.com.intermediate.crt ErrorLog /var/log/httpd/ssl_app1_error.log LogLevel error <Directory "/var/www/html/app1"> Order allow,deny Allow from all Options None </Directory> </VirtualHost> Any idea? and how to keep SSL running on the redirection, HTTPS not just HTTP?
Thanks