Re: VirtualHost configuration not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think I have managed to solve the problem :-) actully, seems I created it as well :S.

First: I thought that by setting a two virtualhosts virtualhost named 000-default, set to listen *:80 and *:443 respectively, I would have made those virtualhosts the default for all the interfaces. However, by the information printed by apachectl -S that was not the case at all: each interface:port pair was showing its own default host, nothing to do with the one I wanted. As soon as I specifically stated the default virtualhosts to listen to <ip0>:80 <ip1>:80 and so on, and also for port 443, the default Virtualhosts appeared as expected.

Second: The site that was not behaving as expected, yet, was a mediawiki. I finally went to check the config files and found the cause of the situation: I had set that mediawiki in a port 80, but in the config file the server was referenced as https and, thus, it was going to the default site.

Thank you very much for your help!
Felix


On Monday 05 October 2015 11:46:11 Yann Ylavic wrote:
> On Sat, Oct 3, 2015 at 4:25 PM, Felix Rubio Dalmau
> <felixrubiodalmau@xxxxxxxxx> wrote:
> >
> > 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.
> 
> There must be a Redirect[Match] directive somewhere in <VirtualHost
> 10.8.0.1:80 ...>, no magic redirection in httpd AFAICT...
> 
> >
> > 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).
> 
> Or possibly a browser (extension) or frontend is playing fancy game to
> protect your privacy?
> 
> Can you see the request coming in on 10.8.0.1:80 (with tcpdump or wireshark)?
> There should be at least an access log line for the original
> (redirected) request.
> 
> Regards,
> Yann.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux