httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Long <>
Subject [users@httpd] IP address show Apache welcome page but domain name working!
Date Tue, 22 Sep 2020 07:37:45 GMT
When I visit my website by its IP address the welcome page of Apache showed, but with ""
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} [OR]
RewriteCond %{SERVER_NAME}
RewriteCond %{HTTP_HOST} ^"Server IP Address"
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

But problem not solved.
Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message