Subdomain creation problem

Discussion in 'General' started by Trunkles, Mar 19, 2017.

  1. Trunkles

    Trunkles Member

    I created a subdomain. YAY! But it doesn't quite behave. :(
    What I expected to get was /var/www/subdomain.domain/ pointing to /var/www/clients/clientX/webY and a basic site template under that. What I actually got was nothing. hat I noticed when creating it was that the options tab was empty and, if I clicked save in the options tab it told me "Domain is empty". If I save from the "subdomain for website" tab it works. I then hd a look in the database. Here's the relevant bits from an SQL export of the web_domain table. Any ideas on what's missing/gone wrong or that I'm doing wrong?

    (1, 2, 2, 'riud', 'ru', '', 1, '*', '', 'drsimon.co.nz', 'vhost', 0, 'name', '/var/www/clients/client1/web1', '', 'web1', 'client1', -1, -1, 'y', 'y', 'y', 1, 1, 'www', 'fast-cgi', 'y', 'y', 'n', '', '', '', 'n', 'n', 'n', '', '', '', '', 'NZ', 'drsimon.co.nz', '', '', '', '', '', NULL, 'webalizer', 'All', '', '', 'n', 'dynamic', 50, 20, 5, 35, 10, 0, '/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/drsimon.co.nz/web:/srv/www/drsimon.co.nz/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin', '', 'none', 1, '', 'y', 'n', '', '', 'n', NULL, '', NULL, '', 0, 'n', 80, 443, NULL),
    (14, 1, 2, 'riud', 'riud', '', 1, NULL, NULL, 'tiki.drsimon.co.nz', 'subdomain', 1, NULL, NULL, NULL, NULL, NULL, 0, -1, 'y', 'y', 'y', 1, 1, 'none', 'y', 'n', 'n', 'n', '', '', NULL, 'n', 'n', 'n', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'webalizer', 'All', NULL, NULL, 'y', 'dynamic', 10, 2, 1, 5, 10, 0, NULL, NULL, 'none', 1, NULL, 'y', 'n', NULL, NULL, 'n', NULL, NULL, NULL, NULL, 0, 'n', 80, 443, NULL);​

    Thanks.
     
  2. sza

    sza Member

    Just try to create the subdomain as if it was a regular website.
    e.g, go to "sites -> website" and add a new website named "sub.domain.com".
    Inside the DNS record of "domain.com" add another A record that points "sub.domain.com" to the same webserver IP Address.
    This should work...

    Good Luck!
     
  3. Trunkles

    Trunkles Member

    Thanks sza, that seemed to work fine. :)
     
    sza likes this.

Share This Page