vhosts / sub domains

Discussion in 'Installation/Configuration' started by stevieb_, Jan 6, 2009.

  1. stevieb_

    stevieb_ New Member

    I had ISPconfig setup and working on a server.
    Via this setup I successfully created the user/domain/subdomain
    with the Vhosts all working correctly.

    ie:
    www.domain.tld -> /web1/
    .domain.tld ->/web1/
    forums.domain.tld ->/web1/forums/


    but no matter what i tried i could not get the FTP to allow logins.

    so uninstalled ISPconfig.

    reinstalled ISPconfig, after completely reinstalling proftpd.

    now the existing domain pointing to /web1/
    works fine
    but no matter where I add the subdomain forums.* it will not add the vhost as before.

    it will add it as a server alias to www.domain.tld .. which isnt what i had before

    I do have a backup of the Vhosts_ispconfig.conf .... but without knowing where in the database to actually readd the forums. subdomain its of no use.
    Can anyone give me any pointers please :)

    *ps. I have tried pretty much all the suggestions so far in this forums, with no luck.

    Regards

    Stevieb
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not readd this manually.

    This might be what you are missing:

    http://www.howtoforge.com/forums/showthread.php?t=12783
     
  3. stevieb_

    stevieb_ New Member

    it wasnt how i had it running before hand.
    But that works just aswell

    Thank you Till :)
     
  4. odonel

    odonel New Member

    stevie, how did you get forums.domain.ltd ??

    The only subdomain I can get to work is www.domain.ltd ....
     
  5. stevieb_

    stevieb_ New Member

    first add your subdomains to the dns

    sub1.
    sub2.
    sub3. etc

    then under your www.domain.tld/web/ folder add the relevant folders
    ie
    www.domain.tld/sub1/
    www.domain.tld/sub2/
    www.domain.tld/sub3/

    then in ISPconfig -> ispmanager -> sites -> www.domain.tld
    in the apache directive add

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^sub1.domain.tld [NC]
    RewriteRule   ^/(.*)$ /sub1/$1  [L]
    making sure that the subdomain AND the folder are named identical

    for each extra subdomain add a new Rewritecond AND RewriteRule

    :)

    The code snippet was pulled from another thread on this forums, that Till pointed me to.

    HTH

    Stevieb
     

Share This Page