DevHeads.net

Apache responds in https, but only by test page, not my website

Hi,

In order to switch from http to https, I have already obtained my SSL
certificates. But my problem is to run the Apache webserver (Server
version: Apache/2.4.23 (Fedora) with https (no problems with http). I mean.
For the http I'm using succesfully:

<VirtualHost *:*80*>
ServerAdmin <a href="mailto: ... at mydomain dot com"> ... at mydomain dot com</a>
DocumentRoot /home/web/mydomain.com
ServerName mydomain.com
</VirtualHost>

But when I define also:

<VirtualHost *:*443*>
ServerAdmin <a href="mailto: ... at mydomain dot com"> ... at mydomain dot com</a>
DocumentRoot /home/web/mydomain.com
ServerName mydomain.com
</VirtualHost>

the server responds in https, typing in the browser *https*://
<a href="http://www.mydomain.com" title="www.mydomain.com">www.mydomain.com</a> (obviously giving me a certificate warning because I have
the certificate but I have not yet configured the server with it) but
return to me only the Apache test page and not the site. If I try other
site pages I obtain "Not Found".
Browsing *http*://www.mydomain.com, instead, everything is ok, as usually.

Where do I wrong?

Thank you very much,
Fabio.

Comments

Re: Apache responds in https, but only by test pag

By Eric Covener at 08/12/2017 - 12:34

On Sat, Aug 12, 2017 at 12:28 PM, Fabio F.Gervasi
<fabio. ... at gmail dot com> wrote:
I'd start by checking for other vhosts on either port (apachectl -S)
then drilling down to individual URL's that return bad results / where
the proper content comes from / finding the configuration for it.

Using custom log files in your vhosts is one way to avoid some of the confusion.