• 14
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

SSL httpd VirtualHost subdomain to Tomcat

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 support@domain.com
  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

    • I think the problem is on the tomcat side, maybe this is attempting to redirect http to https (Eg: 8080 -> 8443)

Trending Tags