Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    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
    Linux server, CentOS 5 operating system

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    What web server?

  6. #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
  •