1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Default Domain

Discussion in 'Plesk for Linux - 8.x and Older' started by sakshale@, Jan 3, 2005.

  1. sakshale@

    sakshale@ Guest

    This may be a simple question.

    I'm on a 1and1 root server. When someone selects a non-existant subdomain name, they always end up pointing to the first, test domain site that we setup.

    Is there a way to control what the default domain is for these types of connections?

    www.example.com -> vhosts/example.com/httpdocs
    sub.example.com -> vhosts/example.com/sub...
    bad.example.com -> vhosts/master.com/htt....
  2. sakshale@

    sakshale@ Guest

    This really has me going in circles. The httpdocs directories in default and default-domain both have the new customer page. Yet, everytime I sneeze I see the page of our first client as the default. Sigh...
  3. brucew

    brucew Guest

    I have a "Domain not configured" page at /home/httpd/vhosts/default/htdocs/index.html

    I have "New User Welcome" page at /home/httpd/vhosts/.skel/0/httpdocs/index.html and /home/httpd/vhosts/default-domain.com/httpdocs/index.html although I'm not certain the latter one is required.

    If you've put other stuff in these locations, that could be the issue.

  4. sakshale@

    sakshale@ Guest


    All of them have the "This Domain has just been registered for one of our customers!" page, so that's not it...
  5. brodiem

    brodiem Guest

    I believe I know why this happens. In /etc/httpd/conf/httpd.include, you'll find a default VirtaulHost that matches all bound IPs on the server, and points to the default document root. What is SUPPOSED to happen is Plesk should add the Include directives for each domain's httpd.include BEFORE this VirtaulHost, but if you look at how it's structured, you'll probably see that some Include directives come after the default VirtualHost. So, for any domains with includes after the default virt host, the default docroot will be served out since it'll be the first virtual host with a matching IP address but no matching ServerName/ServerAlias directive.

    I think the only way to fix this would be to write a wrapper script around /usr/local/psa/admin/bin/websrvmng that re-orders the file once it gets written.

  6. sakshale@

    sakshale@ Guest

    Default Domain [solution]

    You got it! In /etc/httpd/conf/httpd.include, on line 28, was an Include statement for the domain that was acting as the default. All of the other Include statements were down around line 165.

    If I simply moved it to the bottom with the others, any missing host was replaced with the "This Domain has just been registered for one of our customers!" page.

    However, by placing the Include statement, for the domain that I wanted to be default, on line 28, that problem went away.

    Thanks for the pointer.
  7. akucharski

    akucharski Guest

    domain default

    Wait a second. There has to be a setting for this on the UI, no?
  8. akucharski

    akucharski Guest

    straight from the manual

    Selecting a 'default domain'

    The default domain seen in the IP properties is the domain, which has the highest priority defined in the web server configuration file over all domains using the given ip address for hosting. This means that all requests coming to the IP address and not recognized by Web server will be directed to the virtual host of the domain selected as default. If the default domain does not have physical hosting configured or the default domain is not assigned to the IP address, the request will be directed to the default virtual host. This feature allows accessing a domain by specifying an IP address in the address bar of the web browser.

    To assign the default domain for the given IP address, follow these steps:


    At the IP addresses management page, click on the number in the Hosting column of the list, corresponding to the necessary IP address. The page will open displaying the list of domains hosted using this IP address:


    Select the domain using the corresponding radio button.

    Click Set as Default. Now the default domain is assigned.
  9. sakshale@

    sakshale@ Guest

    Re: straight from the manual

    Thank you. I found the link you pointed to . . . not exactly obvious. <grin>
  10. Jack J

    Jack J Guest

    Hi there,
    I also have this problem and I've followed your instructions but still my domain doesn't work.

    If I access the website by typing IP Address I can see a page (broken though as it is Wordpress based)

    Why doesn't it work? do I need to chane any config file?

    I'm on 1&1 dedicated server.

    Any Help?