My problem seems quite simple, but I have no clue where the problem comes from I have apache2, mod_jk, and two apps tomcat, main and test I would like to use main for the "main domain" (so, if I have the url www.mysite.com, I find this main), and if I send test.mysite.com, I go on test
To simulate this (I have now only one domain), I changed the path of main to www.mysite.com/Main and the test to test.mysite.com/Test Problem is, if I go on test.mysite.com/Test, it doesn'T find it.
I use a provider to take care on subdomain existences, and I assume that they did they job correctly to create the subdomain. However, they sent me an ipv6 adress that I can ping
I work 100% under https, so if the user asks for the http, it redirects everything under https
Questions: How can I see where the problem comes from (my config or the provider)? How to solve it!
Thanks a lot for your help
Here is my 000-default.conf file:
<VirtualHost *:80>
ServerName www.mysite.com
JkMount /Main* ajp13_worker
Redirect / https://www.mysite.com/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*?(?:www\.)?mysite\.[\w\.]+.*$
RewriteRule ^(.*?)(?:|www\.)mysite\.[\w\.]+(.*)$ https://www.mysite.com$2
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
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
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
<VirtualHost *:80>
ServerName test.mysite.com
JkMount /Test* ajp13_worker
Redirect / https://test.mysite.com/
RewriteEngine on
RewriteRule ^(.*?)test\.mysite\.[\w\.]+(.*)$ https://test.mysite.com$2
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
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
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>