Amr Elkhedewy asked:
I’m using apache web server on CentOS and I need to disable the ability for people to access the website by using the server’s IP address in a web browser. I want it so that when someone attempts to browse to the IP address they get a forbidden error message.
What configurations would be necessary to do that?
Just set up the default virtual host. There is a commented example in
httpd.conf or do something trivial like:
<VirtualHost *:80> ServerName localhost DocumentRoot /var/www/html </VirtualHost>
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.