Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    SubDomain Problem - Directories?

    Hi, I have a dedicated server running Red Hat 9, with Plesk 7 as the control panel.

    All of my domains are working perfectly, yet as I went to add
    subdomains, I ran into a problem. Now, when a subdomain is created in
    Plesk, it creates the folder for that subdomain in the subdomain
    folder for that domain. I pointed my browser to the new subdomain
    (I'll use ), and you can see the
    "construction.gif" file that is there. In fact, if you type in, it will point to that default
    "skeleton" file with the under construction picture on it.

    So, one would think that these files you see when you point your
    browser to my subdomains would be in the folder it creates...but not
    so, when I FTP to the subdomain's folder, it is empty...which leads me
    to believe that the server is not telling my browser where to go..

    In fact, after looking around the server with SSH, I found the default
    file that you see when you go to any subdomain...and edited it, so
    that I could see what domains were going where. Turns out that EVERY
    subdomain is pointing to the same file, when subdomains that I have
    created should be pointing to the folder in the subdomains directory
    for the parent domain.

    If this is all confusing, I'll explain it more simply here:

    Example: SHOULD point to

    INSTEAD, it is going to a default index file somewhere in the
    server...all subdomains go there, even subdomains that I have not
    created in enter any random letters, and put it before, it will point to that default index.html file.

    Any idea how I would go about fixing this? Is there a file I need to edit?

  2. #2

    Sub domains

    I can not tell you how to do this with Plesk, but can tell you how to do this by editing the httpd.conf file directly.

    Open the httpd.conf file for editing. Add the subdomain <VirtualHost... container BEFORE the <VirtualHost... container for the main host.

    Like this:


    # Sub Domain
    DocumentRoot /usr/var/www/docs/rj1/members/harrisonhaven/buba

    # Main Domain
    DocumentRoot /usr/var/www/docs/rj1/members/harrisonhaven

    In the sub domain example, the request from the browser for will resolve to the folder .../harrisonhaven/buba

    You can make the DocumentRoot anywhere you like, I just used the example of placeing it under the main host.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts