Reverse IP point to another website

Discussion in 'HOWTO-Related Questions' started by Lucrian, Jun 3, 2012.

  1. Lucrian

    Lucrian New Member


    I have CentOS and ISPConfig 3.
    I've configured reverse dns at my hosting to be "".

    On the server I have a domain with several sub-domains.
    The problem:
    Reverse dns at hosting is ""
    If I insert in browser "http://my.ip.address/", the browser display a sub-domain, not the domain.

    I mean, I want that "http://my.ip.address/" to go at "", not to "".

    IP and (sub)domains were added through ISPConfig.

    How can I change this?

  2. Lucrian

    Lucrian New Member

    I found the reason, but not the solution.
    For my IP: I have 3 sites:

    According to Apache, default site is
    So, it's true for my server.

    The problem still remain because all virtual hosts are in folder "/etc/httpd/conf/sites-enabled" and all of them starting with 100-(sub)domain.

    I've changed 100-domain in 010-domain and was great, but I want to use ISPConfig to continue to administrate that domain.

    What can I do?
  3. Lucrian

    Lucrian New Member

    Well done! Maybe somebody will need the solution for this :)
    I let ISPConfig to do it's job in "/etc/httpd/conf/sites-enabled"
    I've modified httpd.conf and at the end of the file (above NameVirtualHost *:80) I wrote

    <VirtualHost my.first.ip:80>
        RewriteEngine on
        RewriteCond %{HTTP_HOST}   ^my.first.ip$ [NC]
        RewriteRule   ^/(.*)$http://www.first.domain/$1  [R,L]
    <VirtualHost my.secondary.ip:80>
        RewriteEngine on
        RewriteCond %{HTTP_HOST}   ^my.secondary.ip$ [NC]
        RewriteRule   ^/(.*)$http://www.secondary.domain/$1  [R,L]
    Good luck!

Share This Page