You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Fabio F.Gervasi" <fa...@gmail.com> on 2017/08/12 16:28:34 UTC

[users@httpd] 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 myname@mydomain.com
    DocumentRoot /home/web/mydomain.com
    ServerName mydomain.com
</VirtualHost>

But when I define also:

<VirtualHost *:*443*>
    ServerAdmin myname@mydomain.com
    DocumentRoot /home/web/mydomain.com
    ServerName mydomain.com
</VirtualHost>

the server responds in https, typing in the browser *https*://
www.mydomain.com (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.

Re: [users@httpd] Apache responds in https, but only by test page, not my website

Posted by "Fabio F.Gervasi" <fa...@gmail.com>.
Sorry, maybe did you mean https -S...

[root@servercm master]# httpd -S
AH00112: Warning: DocumentRoot [/home/web/dancemusicawards.ru] does not
exist
AH00112: Warning: DocumentRoot [/home/web/www.dancemusicawards.ru] does not
exist
[Sun Aug 13 11:01:53.899753 2017] [alias:warn] [pid 27571:tid
139691180570816] AH00671: The Alias directive in
/etc/httpd/conf.d/phpMyAdmin.conf at line 8 will probably never match
because it overlaps an earlier Alias.
[Sun Aug 13 11:01:53.899875 2017] [alias:warn] [pid 27571:tid
139691180570816] AH00671: The Alias directive in
/etc/httpd/conf.d/phpMyAdmin.conf at line 9 will probably never match
because it overlaps an earlier Alias.
VirtualHost configuration:
*:80                   is a NameVirtualHost
         default server centrometeo.com (/etc/httpd/conf/httpd.conf:470)
         port 80 namevhost centrometeo.com (/etc/httpd/conf/httpd.conf:470)
         port 80 namevhost dancemusicawards.ru
(/etc/httpd/conf/httpd.conf:479)
         port 80 namevhost www.dancemusicawards.ru
(/etc/httpd/conf/httpd.conf:485)
*:443                  is a NameVirtualHost
         default server centrometeo.com (/etc/httpd/conf.d/ssl.conf:56)
         port 443 namevhost centrometeo.com (/etc/httpd/conf.d/ssl.conf:56)
         port 443 namevhost centrometeo.com (/etc/httpd/conf/httpd.conf:491)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/home/web"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex lua-ivm-shm: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex cache-socache: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: MODPERL2
User: name="apache" id=48
Group: name="apache" id=48

Maybe there is soma problem about ssl.conf?


2017-08-12 19:18 GMT+02:00 Fabio F.Gervasi <fa...@gmail.com>:

> I try to run:
>
> [root@servercm httpd]# apachectl -S
>
> but it does not return anything...
>
>
> 2017-08-12 19:07 GMT+02:00 Eric Covener <co...@gmail.com>:
>
>> On Sat, Aug 12, 2017 at 12:47 PM, Fabio F.Gervasi
>> <fa...@gmail.com> wrote:
>> > Hi Eric, thank you.
>> >
>> > I'm not expert, I did not understand what to do... Regarding logs, I
>> > defined:
>> >
>> > <VirtualHost *:443>
>> >     ServerAdmin fabio.gervasi@centrometeo.com
>> >     DocumentRoot /home/web/centrometeo.com
>> >     ServerName centrometeo.com
>> >     ErrorLog logs/https-centrometeo.com-error_log
>> >     CustomLog logs/https-centrometeo.com-access_log common
>> > </VirtualHost>
>> >
>> > So, using differents name/files, but after a few attempts to access via
>> > https, empty files were created, so there is nothing in the logs.
>>
>> That means you have another virtualhost handling your port 443 traffic.
>>
>> apachectl -S will summarize where your vhosts are defined if you can't
>> find them with grep or an editor.
>>
>>
>> --
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>

Re: [users@httpd] Apache responds in https, but only by test page, not my website

Posted by "Fabio F.Gervasi" <fa...@gmail.com>.
I try to run:

[root@servercm httpd]# apachectl -S

but it does not return anything...


2017-08-12 19:07 GMT+02:00 Eric Covener <co...@gmail.com>:

> On Sat, Aug 12, 2017 at 12:47 PM, Fabio F.Gervasi
> <fa...@gmail.com> wrote:
> > Hi Eric, thank you.
> >
> > I'm not expert, I did not understand what to do... Regarding logs, I
> > defined:
> >
> > <VirtualHost *:443>
> >     ServerAdmin fabio.gervasi@centrometeo.com
> >     DocumentRoot /home/web/centrometeo.com
> >     ServerName centrometeo.com
> >     ErrorLog logs/https-centrometeo.com-error_log
> >     CustomLog logs/https-centrometeo.com-access_log common
> > </VirtualHost>
> >
> > So, using differents name/files, but after a few attempts to access via
> > https, empty files were created, so there is nothing in the logs.
>
> That means you have another virtualhost handling your port 443 traffic.
>
> apachectl -S will summarize where your vhosts are defined if you can't
> find them with grep or an editor.
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache responds in https, but only by test page, not my website

Posted by Eric Covener <co...@gmail.com>.
On Sat, Aug 12, 2017 at 12:47 PM, Fabio F.Gervasi
<fa...@gmail.com> wrote:
> Hi Eric, thank you.
>
> I'm not expert, I did not understand what to do... Regarding logs, I
> defined:
>
> <VirtualHost *:443>
>     ServerAdmin fabio.gervasi@centrometeo.com
>     DocumentRoot /home/web/centrometeo.com
>     ServerName centrometeo.com
>     ErrorLog logs/https-centrometeo.com-error_log
>     CustomLog logs/https-centrometeo.com-access_log common
> </VirtualHost>
>
> So, using differents name/files, but after a few attempts to access via
> https, empty files were created, so there is nothing in the logs.

That means you have another virtualhost handling your port 443 traffic.

apachectl -S will summarize where your vhosts are defined if you can't
find them with grep or an editor.


-- 
Eric Covener
covener@gmail.com

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


Re: [users@httpd] Apache responds in https, but only by test page, not my website

Posted by "Fabio F.Gervasi" <fa...@gmail.com>.
Hi Eric, thank you.

I'm not expert, I did not understand what to do... Regarding logs, I
defined:

<VirtualHost *:443>
    ServerAdmin fabio.gervasi@centrometeo.com
    DocumentRoot /home/web/centrometeo.com
    ServerName centrometeo.com
    ErrorLog logs/https-centrometeo.com-error_log
    CustomLog logs/https-centrometeo.com-access_log common
</VirtualHost>

So, using differents name/files, but after a few attempts to access via
https, empty files were created, so there is nothing in the logs.

Fabio.


2017-08-12 18:34 GMT+02:00 Eric Covener <co...@gmail.com>:

> On Sat, Aug 12, 2017 at 12:28 PM, Fabio F.Gervasi
> <fa...@gmail.com> wrote:
> > 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 myname@mydomain.com
> >     DocumentRoot /home/web/mydomain.com
> >     ServerName mydomain.com
> > </VirtualHost>
> >
> > But when I define also:
> >
> > <VirtualHost *:443>
> >     ServerAdmin myname@mydomain.com
> >     DocumentRoot /home/web/mydomain.com
> >     ServerName mydomain.com
> > </VirtualHost>
> >
> > the server responds in https, typing in the browser
> https://www.mydomain.com
> > (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.
>
> 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.
>
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache responds in https, but only by test page, not my website

Posted by Eric Covener <co...@gmail.com>.
On Sat, Aug 12, 2017 at 12:28 PM, Fabio F.Gervasi
<fa...@gmail.com> wrote:
> 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 myname@mydomain.com
>     DocumentRoot /home/web/mydomain.com
>     ServerName mydomain.com
> </VirtualHost>
>
> But when I define also:
>
> <VirtualHost *:443>
>     ServerAdmin myname@mydomain.com
>     DocumentRoot /home/web/mydomain.com
>     ServerName mydomain.com
> </VirtualHost>
>
> the server responds in https, typing in the browser https://www.mydomain.com
> (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.

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.


-- 
Eric Covener
covener@gmail.com

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