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

Re: Default virtualhost on Debian Jessie with Apache 2.4.10



On 2015-04-30, Daniel Bareiro <daniel-listas@gmx.net> wrote:
> Hi all!
>
> Currently I have a unique site in sites-enabled which is accessed only
> via HTTPS. Hoping to have an access error when trying to access this
> site via HTTP, Apache sends me to the default site which is "It's
> works!" page in /var/www/html.
>
> I was looking in the Apache configuration files where is configured the
> default site but I have not found it. This was set at low level in the
> compilation of the service?
>
>
> Thanks in advance!
>
> Best regards,
> Daniel
>
>

You can create a file, .htaccess , in the top level to be protected with:

SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq "www.yoursite.org"
ErrorDocument 403 https://www.yoursite.org/pathto/httperror.htm


Reply to: