Results 1 to 2 of 2
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
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-06-2004 #1Just Joined!
- Join Date
- Jul 2004
- Posts
- 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 myadmin.royalquincy.com ), and you can see the
"construction.gif" file that is there. In fact, if you type in
anything.AnyDomainOnMyServer.com, 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: myadmin.royalquincy.com SHOULD point to
".../royalquincy.com/subdomains/myadmin/httpdocs/"
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 Plesk...you enter any random letters, and put it before
.royalquincy.com, 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?
- 07-09-2004 #2Just Joined!
- Join Date
- Jul 2004
- Posts
- 7
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:
NameVirtualHost 207.123.130.227:80
# Sub Domain
<VirtualHost 207.123.130.227:80>
ServerAdmin ray@harrisonhaven.com
ServerName buba.harrisonhaven.com
DocumentRoot /usr/var/www/docs/rj1/members/harrisonhaven/buba
</VirtualHost>
# Main Domain
<VirtualHost 207.123.130.227:80>
ServerAdmin ray@harrisonhaven.com
ServerName harrisonhaven.com
DocumentRoot /usr/var/www/docs/rj1/members/harrisonhaven
</VirtualHost>
In the sub domain example, the request from the browser for buba.harrisonhaven.com 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.


Reply With Quote
