I have a fairly basic question. Please be patient with me.
As an example, say I host "www.example.com" and "www.another-example.com" on a single server with an ip address of "18.104.22.168".
Here would be a typical apache configuration:
Listen 80 NameVirtualHost *:80 <VirtualHost *:80> ServerName www.example.com # Other directives here </VirtualHost> <VirtualHost *:80> ServerName www.another-example.com # Other directives here </VirtualHost>
How do I return a 404 error code for a request to "http://22.214.171.124" without blocking all websites on the server?
Could you please include an example of an apache configuration directive I should be using?