Setup subdomain with ISPConfig

Discussion in 'Installation/Configuration' started by Nap, Jul 30, 2012.

  1. Nap

    Nap Member

    I am trying to get a subdomain going using ISPConfig (Apache2), but I can't get it right.
    I added the subdomain using the Sub-Domain Link in the left panel, and I followed the instructions in the ISPConfig manual. I'm using a URL redirect, so the type is set to [R,L]. The subdomain is located in a sub-folder of the domain on the same machine.

    http://subdomain.domain.tld didn't work in my browser. It responded 'Server Not Found'. So I looked into the DNS area of ISPConfig. I'm running BIND9.

    I currently don't have any entries there. I'm using my VPS provider's name servers.

    Do I need to add (using the Wizard) a record for the parent domain?
    Do I need to add another record for the subdomain? (For the DNS name server fields, would I use my VPS providers name server, as I did for the parent domain, or can I use ns1.mydomain.tld, where mydomain.tld is the domain linked to client0 [Administrator's site])
    Do I need to make changes to the master Domain record (at my registra's site)?
    Do I HAVE TO setup a subdomain as a new site in ISPConfig? I'm hoping to use the parent domain folder tree.

    So many questions....

    Last edited: Jul 30, 2012
  2. Nap

    Nap Member

    Here is how I've set it up so far (ISPConfig):

    various settings overall
    Domain = client1_domain.tld
    Auto-Subdomain = *.
    no Redirects

    Host = subdomain_name
    Domain = client1_domain.tld (dropdown list)
    Redirect type = R,L
    Path = http://www.client1_domain.tld/subdomain_name
    Active = Tick

    [DNS ZONE] Added a DNS Zone using the Wizard, as I didn't have one setup in ISPConfig earlier.
    Server myhostname.client0_domain.tld (client0_domain is the server administrator's domain name)
    Client = client1
    Domain = client1_domain.tld
    IP Address = (Static IP of the Server) [can I use a FQDN here?]
    NS1 = ns1.client0_domain.tld (I'm assuming these nameservers were established when I installed BIND9)
    NS2 = ns2.client0_domain.tld
    Email = WebMaster@client1_domain.tld

    When going back to edit the DNS Zone, here is the info shown:
    Server = myhostnam.client0_domain.tld
    Client = Client1
    Zone(SOA) = client1_domain.tld.
    NS = ns1.client0_domain.tld.
    Email = WebMaster.client1_domain.tld.
    Refresh/Retry/Expire/Minumum/TTL (all left @ default values)
    Active = Tick
    Other fields left blank.

    [Records] Added a CNAME record to the DNS Zone
    Hostname = subdomain_name
    Target Hostname = subdomain_name.client1_domain.tld
    TTL = Default
    Active = Tick

    I checked /etc/apache2/sites-available to see what's going on there. ISPConfig has made the updates, to client1_domain.tld.vhost file as follows:
    <VirtualHost *:80>
          DocumentRoot /var/www/client1_domain.tld/web
        ServerName client1_domain.tld
        ServerAlias *.client1_domain.tld
        ServerAlias subdomain_name.client1_domain.tld
        ServerAdmin webmaster@client1_domain.tld
    ...  and later in the file  ...
        RewriteEngine on
        RewriteCond %{HTTP_HOST}   ^subdomain_name.client1_domain.tld$ [NC]
            RewriteCond %{REQUEST_URI} !^/webdav/
        RewriteRule   ^/(.*)$ http://www.client1_domain.tld/subdomain_name/$1  [R,L]
    I tried pinging the subdomain, but ping was not able to resolve the address.

    I'm not sure what other information would help diagnose what's going wrong.
    Last edited: Jul 30, 2012
  3. pititis

    pititis Member

    You need to add a DNS A record for the subdomain after define it in the website tab.


Share This Page