Subdomains By Different Methods

Discussion in 'General' started by Lalas Muathasim M, Jul 22, 2016.

  1. Lalas Muathasim M

    Lalas Muathasim M New Member

    Hi
    This question might have already discussed several times, if so please redirect me to the right page. I have a couple of doubts regarding how to create subdomain. (I Use ISPconfig3 on centos 6.5). We have two methods to create a subdomain to a site.

    Method 1.
    By clicking on ‘Subdomain For Website’
    If my domain is mysite.com and I need my subdomain as sub.mysite.com (mysite.com and sub.mysite.com have different contents). I Tried to add subdomain by clicking on ‘Subdomain for website’ and gave the following info.

    Host: sub
    Domain: mysite.com::..
    Redirect type:
    Redirect Path:

    In my case the content for mysite.com and sub.mysite.com is different. Do I need to give any redirect path and redirect type? What will be the root folder for sub.mysite.com. Does the root folder will be created automatically as in creating ‘Add new website’. If yes what is the url to the root folder normally.
    As of now I did not give any redirect type and redirect path. So Now if I go to sub.mysite.com nothing shows except ‘site cant be reached’ message by the browser.
    Or do I need to go for the second method to create a subdomain by clicking ‘Add new website’ and create a new website like sub.mysite.com.

    Please tell me what is the different between these two methods?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The first method adds the subdomain to an existing website, you use this method for multidomain capable cms like typo3 or wordpress with the multidomain extension. Showing different content is managed by the cms here.

    If you don't use a multi domain capable cms and want to upload a different content into a folder for this subdomain, then you should create a website for the subdomain.

    There is a third method called vhost subdomain which adds the subdomain with a separate path to an existing site, but it's not recommended to use that for security reasons.
     
  3. Lalas Muathasim M

    Lalas Muathasim M New Member

    Thanks for the reply.
    I have chosen the second method and i noticed a very weird thing that the content in my subdomain is automatically copied to the main domain(as it was synced). My main domain (mysite.com) was empty before.
     
  4. Lalas Muathasim M

    Lalas Muathasim M New Member

    So I'm reluctant to delete the content in the folder of mydomain.com because i'm afraid that it may lead to auto deletion of content in the web folder of sub.mydomain.com. Should i be worried?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig does not copy any data between websites. When you add a new website (does not matter if its a subdomain or second level domain, then ispconfig creates a new empty web folder for this site.
     
  6. Lalas Muathasim M

    Lalas Muathasim M New Member

    When we create a “Add a new website” I have noticed some folders are created automatically like
    /var/www/clients/client1/web2/web
    /var/www/clients/client1/web2/private
    /var/www/clients/client1/web2/tmp
    /var/www/mysite.com/web
    /srv/www/mysite.com/web
    /usr/share/php5
    /usr/share/php
    /tmp
    /usr/share/phpmyadmin
    /etc/phpmyadmin
    /var/lib/phpmyadmin

    Among these folders some are in sync with each other like /var/www/clients/client1/web2/web and /var/www/mysite.com/web seems to be in sync with each other. Among these folders which one is our root folder. And to which folder do we need to add files?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The website folder is this /var/www/clients/client1/web2/web The folders wth the domain name are symlinks for easy shell navigation and not folders and the php and phpmyadmin folders are not related to ispconfig at all, they existed before you installed ispconfig on your server.

    So you see, nothing got synced nor copied on your server.
     
  8. Lalas Muathasim M

    Lalas Muathasim M New Member

    Thank you.... Thank you for the info...i got it

    Mistake was mine. I used ftp user created for the subdomain (sub.mysite.com) to the domain (mysite.com) also. So when I connect to mysite.com via ftp client the folder for the subdomain was showing.
     
    Last edited: Jul 23, 2016

Share This Page