Re: IP address show Apache welcome page but domain name working!

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

 



I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
When I browse my website by its IP address then browser show me "Your connection is not private".





On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <covener@xxxxxxxxx> wrote: 





On Tue, Sep 22, 2020 at 3:38 AM Jason Long <hack3rcon@xxxxxxxxx.invalid> wrote:
>
> Hello,
> When I visit my website by its IP address the welcome page of Apache showed, but with "https://domain-name.net"; everything is OK. How can I block direct access by IP or forward it to domain?
> I enabled "mod_rewrite" and my Virtual Host config is:
>
> RewriteEngine on
> RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> RewriteCond %{SERVER_NAME} =www.mydomain.com
> RewriteCond %{HTTP_HOST} ^"Server IP Address"

Missing an [OR[ here on 2nd condition?


> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
>
> But problem not solved.
> Thank you.

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


-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
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