1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Subdomains Not Working

Discussion in 'Plesk for Linux - 8.x and Older' started by raygp, Dec 29, 2004.

  1. raygp

    raygp Guest

    0
     
    I am having a problem with subdomains. I have a domain that has an exclusive IP Address and has subdomains.

    Trying to access the subdomain just sends them to the main domain.

    in other words:
    subdomain.domain.com goes to the same as
    www.domain.com

    I tried to restart apache and got this message.

    Stopping httpd: [ OK ]
    Starting httpd: [Wed Dec 29 09:51:44 2004] [warn] VirtualHost 65.100.113.1:80 overlaps with VirtualHost 65.100.113.1:80, the first has precedence, perhaps you need a NameVirtualHost directive
    [ OK ]

    I tried changing the address to a shared address, that didn't help!

    Also all subdomains on my main shared ip address work fine.
    Do I need to add a NameVirtualHost somewhere in the conf?
     
  2. Cthulhu

    Cthulhu Guest

    0
     
    I had this same problem, it was fixed with "/usr/local/psa/admin/sbin/websrvmng -a -v" and restart httpd
     
  3. Maxwell Smart

    Maxwell Smart Guest

    0
     
    I'm having this same problem with subdomains. I've run the webservmng command to rebuild the conf file and it does correct the problem so that my subdomain works.

    However the primary domain then fails!

    I've checked the httpd.conf file within the domain directory and it points to the correct file system folders on the server.

    Any suggestions please?
     
  4. pwgen

    pwgen Guest

    0
     
    Hi there!

    First way:

    1. create a subdomain SUB.DOMAIN.COM in Plesk control panel:

    Domains -> DOMAIN.COM -> Subdomains

    2. then create vhost.conf file in the subdomain's config directory: /home/httpd/vhosts/DOMAIN.COM/subdomains/SUB/conf/vhost.conf and put the following record inside:

    ---
    DirectoryRoot /home/httpd/vhosts/DOMAIN.COM/httpdocs
    ---

    3. run "/usr/local/psa/admin/sbin/websrvmng -a -v" to apply the changes.

    Now then you access http://sub.domain.com you'll get the main domain's content.

    Second way:

    2. put the following directive in the /home/httpd/vhosts/DOMAIN.COM/subdomains/SUB/conf/vhost.conf file:

    ---
    Redirect / http://domain.com
    ---

    In this way when you access http://sub.domain.com you'll be redirected to http://domain.com.

    I didn't test this way by myself however hope this helps.
     
Loading...