Saturday 22 July 2017

How to stop a domain name pointing to your website IP address

 
You cannot have it refuse connections, since the hostname (or IP) that the user is trying to use as their HTTP host is not known to the server until the client actually sends an HTTP request. The TCP listener is always bound to the IP address.
Would an HTTP error response be acceptable instead?

<VirtualHost *:80>
    ServerName catchall
    <Location />
        Order allow,deny
        Deny from all
    </Location>
</VirtualHost>

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/
    <Directory /var/www/>
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

2 comments:

  1. Great article by the great author, it is very massive and informative but still preaches the way to sounds like that it has some beautiful thoughts described so I really appreciate this article. Best microsoft teams voip integration service provider

    ReplyDelete
  2. Many believe a calling card will enable them to phone home more affordably. Although they are inexpensive, you won't always have access to a phone. Static IP SIM Card

    ReplyDelete