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 "1.2.3.4".
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://1.2.3.4" without blocking all websites on the server?
Could you please include an example of an apache configuration directive I should be using?