Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, how i should block unwanted domain from accessing my server. For example my domain is yyy.com it is linked to my server and domain xxx.com is not my and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2013
    Posts
    5

    Block unwanted domain from accessing server


    Hello, how i should block unwanted domain from accessing my server. For example my domain is yyy.com it is linked to my server and domain xxx.com is not my and it is linked to my server too. And when people go to xxx.com see my website.

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,188
    In any case the best approach would be to inform the name server responsible for the domain name that their settings are wrong. 'whois xxx.com' will tell you the registrar.

    What server are you running? In the meantime you should be able to respond to queries for that domain with a HTTP 404 but the method will depend on the server you're using.

  3. #3
    Just Joined!
    Join Date
    Dec 2013
    Posts
    5
    Linux server, CentOS 5 operating system

  4. #4
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,188
    What web server?

  5. #5
    Just Joined!
    Join Date
    Dec 2013
    Posts
    5
    I found solution in httpd.conf
    NameVirtualHost *:80
    <VirtualHost *:80>
    <Location />
    Order deny,allow
    Deny from all
    </Location>
    </VirtualHost>

    <VirtualHost *:80>
    ServerName yyy.com
    ServerAlias yyy.com
    </VirtualHost>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •