Hi Yann,

        At first, I have executed apachetl -S and this is what I have obtained:

===========
10.8.0.1:443           site0.example.com
10.8.0.1:80            is a NameVirtualHost
         default server site0.example.com
         port 80 namevhost site0.example.com
         port 80 namevhost site1.example.com
         port 80 namevhost site2.example.com
         port 80 namevhost site3.example.com
         port 80 namevhost site4.example.com
192.168.1.2:443        is a NameVirtualHost
         default server site0.example.com
         port 443 namevhost site0.example.com
         port 443 namevhost site2.example.com
         port 443 namevhost site4.example.com
127.0.0.2:80           site5.example.com
127.0.0.1:80           site0.example.com
*:80                   default.example.com
*:443                  default.example.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults                                               
                                                                                
                              
Mutex ssl-stapling-refresh: using_defaults                                      
                                                                                
                              
Mutex authdigest-client: using_defaults                                         
                                                                                
                              
Mutex ssl-stapling: using_defaults                                              
                                                                                
                              
Mutex ssl-cache: using_defaults                                                 
                                                                                
                              
Mutex default: dir="/var/lock/apache2" mechanism=fcntl                          
                                                                                
                              
Mutex mpm-accept: using_defaults                                                
                                                                                
                              
Mutex authdigest-opaque: using_defaults                                         
                                                                                
                              
PidFile: "/var/run/apache2/apache2.pid"                                         
                                                                                
                              
Define: DUMP_VHOSTS                                                             
                                                                                
                              
Define: DUMP_RUN_CFG                                                            
                                                                                
                              
User: name="www-data" id=33                                                     
                                                                                
                              
Group: name="www-data" id=33
===========

I have realised that, although default.example.com is set at *:80 and *:443 
interfaces/ports, this site is not set as default in case there is no 
configuration that matches the input connection for every specific 
interface/port pair. Hence, I have modified default.example.com's config file 
to show like

<VirtualHost <ip0>:80 <ip1>:80 <ip2>:80>
....

<VirtualHost <ip0>:443 <ip1>:443 <ip2>:443>
....

This is what I have obtained then, when running apachectl -S
===========
10.8.0.1:443           is a NameVirtualHost                                     
                                                                                
                              
         default server default.example.com
         port 443 namevhost default.example.com
         port 443 namevhost site0.example.com
10.8.0.1:80            is a NameVirtualHost
         default server default.example.com
         port 80 namevhost default.example.com
         port 80 namevhost site0.example.com
         port 80 namevhost site1.example.com
         port 80 namevhost site2.example.com
         port 80 namevhost site3.example.com
         port 80 namevhost site4.example.com
192.168.1.2:80         default.example.com
192.168.1.2:443        is a NameVirtualHost
         default server default.example.com
         port 443 namevhost default.example.com
         port 443 namevhost site0.example.com
         port 443 namevhost site2.example.com
         port 443 namevhost site4.example.com
127.0.0.2:443          default.example.com
127.0.0.2:80           is a NameVirtualHost
         default server default.example.com
         port 80 namevhost default.example.com
         port 80 namevhost site5.example.com
127.0.0.1:443          default.example.com
127.0.0.1:80           is a NameVirtualHost
         default server default.example.com
         port 80 namevhost default.example.com
         port 80 namevhost site0.example.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl 
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
===========

So now seems to be set-up correctly default.example.com as the default site for 
every connection. Is this supposed to happen this way?

After this change, if I ping site3.example.com, the address is properly 
resolved to the vpn (10.8.0.1). Then, from Firefox, I access 
http://site3.example.com and the URL is magically converted into 
https://site3.example.com, and default.example.com is served.

I have checked in the apache config file for site3 and there is no rewrite 
section, and also in the folder for that site there is no .htaccess with any 
rewrite directive. I have also created a plain index.html and specifically 
requested that file, with the same results.

If I check the log for site3, I see no requests. On the other hand, I see the 
requests I just made as for default.example.com, on port 443 (although I had 
requested port 80).

What any other debug/configuration parameters can I send you to help me debug 
this behavior?. If needed I can put the configuration files, but will take a 
while as there are many and I need to anonymize some parts.

Thank your very much for your time and help,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to