logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: http web site still available even if no config for it ?!?
Author
yoyo



Joined: 13 Oct 2016
Posts: 3
Location: lupinville

PostPosted: Thu 13 Oct '16 11:21    Post subject: http web site still available even if no config for it ?!? Reply with quote

Hi currently use Apache/2.2.22 on Debian

I did modify my apache conf in order to get virtual host and a https website.

My only file on "sites-enabled" directory is :

<VirtualHost *:443>
ServerName XXX
DocumentRoot /var/wwws
SSLEngine On
SSLCertificateFile /home/lionel/srv/ssl/xxx.pem
SSLCertificateKeyFile /home/lionel/srv/ssl/YYY.pem
SSLProtocol all -SSLv2
SSLCACertificateFile /home/lionel/srv/ssl/ZZZ.pem
#SSLVerifyClient require
#SSLVerifyDepth 1
</VirtualHost>

From a default installation, I have some files on /var/www
I cannot find anyplace in my installation where something is linked to /var/www

Anyway,
when I try to access my website using https, it runs ok the content of /var/wwws
BUT
when I try to access my website using http, it runs also ok the content of /var/www

The only solution I found was to deactivate the http is to remove Listen 80 in ports.conf and it works fine but I still can not figure out how apache2 can run content of /var/www as it is not defined in any configuration file.

Can somebody help me ?

Thanks a lot in advance.
Back to top
yoyo



Joined: 13 Oct 2016
Posts: 3
Location: lupinville

PostPosted: Thu 13 Oct '16 22:01    Post subject: Reply with quote

hi again,

it seems I am not the only one :
http://serverfault.com/questions/716175/apache-2-2-a2dissite-default-not-removing-access-to-its-document-root

but still do not know why ?!?
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Fri 14 Oct '16 8:19    Post subject: Reply with quote

If you enable both ports you must have a DocumentRoot defined. Otherwise Apache would not even start but would give you an error message that you have to define DocumentRoot.

Proposal:

cd to the config directory and grep for all documentroots

Code:

cd /etc/apache2
grep -Hirn DocumentRoot .


This should show all potential candidates.
Back to top
yoyo



Joined: 13 Oct 2016
Posts: 3
Location: lupinville

PostPosted: Mon 17 Oct '16 14:58    Post subject: Reply with quote

Hi,

this is what makes me think that it is hardcoded somewhere.
No DocumentRoot except the one I defined for my https.
I even tried to search for "/var/www" but also could not find it.

Thanks.
Back to top
r4a5a88



Joined: 17 Oct 2016
Posts: 5
Location: Germany

PostPosted: Mon 17 Oct '16 16:40    Post subject: Reply with quote

have you tried a2dissite 000-default.conf
that is the default page for http
check your sites-enabled directory to pls
Back to top


Reply to topic   Topic: http web site still available even if no config for it ?!? View previous topic :: View next topic
Post new topic   Forum Index -> Apache