Can't Figure Out Subdomains In ISPCONFIG 3

Discussion in 'General' started by blackonblack, Jun 2, 2009.

  1. blackonblack

    blackonblack New Member

    For the past few weeks I've been fooling around with ispconfig, having followed the ubuntu tutorial, which I have to saw was extremely impressed by. Thank you. However, it's been fairly tough to find ispconfig 3 documentation and tutorials, most of articles I've found were for ISPconfig 2 from which I have no experience with. Anyways, after adding a new site under the admin user, I have not been able to get a subdomain working. in the past I've had user experience with cpanel, when you make a subdomain it makes another folder in your user file, like a totally new root. Very easy . What do I do in ispconfig 3! When I click subdomain, I enter the name of my subdomain, then it gives a redirect option with like R, L whatever and then it lists a redirect field. If i want to make a subdomain webmail to install roundcube, what on earth do I have to do, i've tried every combination of things.

    Also, as of DNS all I have to do is add a cname record of webmail.mydomain.com correct?
     
  2. till

    till Super Moderator

    Its as easy as in ispconfig. If you want to get a new document root for a subdomain, click on new websitze, enter sub.domain.com as domain name and click on save.

    If you use the subdomain function, the subdomain has the same webroot then the website you create it in.
     
  3. BorderAmigos

    BorderAmigos New Member

    I haven't been able to get this to work either. cPanel will create the webroot for sub.domain.com in domain.com/sub. ISPConfig3 creates it as a completely separate directory when you use the create site function. Using the subdomain function appeared to have created an entry but it returns a Page Not Found error in trying to load it. Subdomain function doesn't appear to create any directories anywhere and would probably have to use redirect to go to a subdirectory. Maybe I need to wait for a cron job to run after creating a subdomain?
     
  4. till

    till Super Moderator

    ISPConfi groups domains by client while cpanel groups it by domain. So there is no real difference as cpanel also creates a new directory for the vhost.

    If you want to use a redirect for a subdomain you have to create the directory!
     
  5. BorderAmigos

    BorderAmigos New Member

    I was just pointing out that they create the directories in different locations.

    As far as redirect, I tried to an already existing directory that works fine when called as domain.com/sub but gives a page not found when tried as sub.domain.com redirected to domain.com/sub.
     
  6. till

    till Super Moderator

    Then you entered something wrong as the redirect function works fine.

    Make sure that you select "R" as redirect type and that the folder path starts with a / and ends with a /. Example: /subfolder/
     
  7. BorderAmigos

    BorderAmigos New Member

    This is what I'm doing, creating the following subdomain in ispconfig 3.0.1.3...

    HOST: subdomain
    DOMAIN: servidora.net
    REDIRECT TYPE: R
    REDIRECT PATH: /subdomain/
    ACTIVE: (Checked)

    Trying http://subdomain.servidora.net/ gives "Address Not Found". But http://servidora.net/subdomain/ works fine.

    servidora.net.vhost contains the following...

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^subdomain.servidora.net [NC]
    RewriteRule ^/(.*)$ /subdomain/$1 [R]

    and I did restart apache.
     
    Last edited: Jun 3, 2009
  8. till

    till Super Moderator

    Then you missed to create the subdomain in dns ;)
     
  9. BorderAmigos

    BorderAmigos New Member

    That is probably it as there was no indication that this needed to be done as a separate step. So the subdomain will need it's own zone? Or just CNAME or an A record in servidora.net?
     
  10. till

    till Super Moderator

    If you want to use a domain or subdomain it has to be exist! Your browser can not guess were to find a domain if you did not create it in dns.

    You have to create a dns A-Record for every domain or subdomain that you want to use on a server.
     
  11. BorderAmigos

    BorderAmigos New Member

    Ok, I did that now and I guess I have to wait for it to propagate.

    This is where some of the confusion is maybe for us coming from cpanel as it handles all the DNS entries automatically.

    EDIT: Uff... Now it's in a Redirect Loop just adding /subdomain/ over and over to the original subdomain.servidora.net. I give up for now.

    Code:
    http://subdomain.servidora.net/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/subdomain/
     
    Last edited: Jun 3, 2009
  12. till

    till Super Moderator

    Then you entered a wrong redirect path or the wrong redirect type. Its really easy, dont know what you are doing *confused*
     
  13. blocker

    blocker Member

    Hello,

    i have exactly the same problem - Redirect Loop

    tripple reread the post and tripple checked my settings, everything setting seem to be the right one

    Any Idea
     
  14. BorderAmigos

    BorderAmigos New Member

    I am thinking it has something to do with the interaction of name servers maybe. From my registrar to dyndns to local. But it's still unresolved. I posted previously exactly what I am doing and it is exactly per instructions, but not working.
     
  15. blocker

    blocker Member

    i need now rest and my dog needs a walk, later i can test with our DNS system, which i can control, and some test domain. I will post the results. Btw i already tested with editing my hosts file - the result was again redirect loop...
     
  16. blocker

    blocker Member

    Hello,

    just tested it with domain hosted on our dns system, freshly added to the ispconfig3 - the result is the same: Redirect Loop

    if that helps: my current system is debian lenny 64 bit, installed according the ispconfig3 documentation

    UPDATE:
    Just tested it on another server running ISPC3 and debian lenny 64bit, the result is the same: Redirect Loop
     
    Last edited: Jun 19, 2009
  17. till

    till Super Moderator

    Set the redirect type to L. Just tested oit on debian lenny and it works fine.
     
  18. blocker

    blocker Member

    with option "L" i get: Internal Server Error

    and the in the apache stays:

    Code:
    Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    UPDATE: i found that it was my fault with the option L it works on the 2nd server very well!!!
     
    Last edited: Jun 19, 2009
  19. till

    till Super Moderator

  20. blocker

    blocker Member

    strange problem

    Hello,

    now the redirect works perfect on both servers using the "L" option. Thank you for all the help!!!

    I have experienced something very strange
    I made a subdomain dev.example.com to redirect to /dev/ subfolder in the WWWROOT of the domain example.com, using the "L". Instead of this the redirect goes to /dev folder on the rootfs :eek:

    of course that happens only when i want to redirect to /dev/, changing it to something else e.g. /test/ makes it work perfect.
     

Share This Page