This is a discussion on Virtual domains -- Help! within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, For some reason, Apache isn't pointing each domain to a seperate folder, this the last part of my ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
For some reason, Apache isn't pointing each domain to a seperate folder, this the last part of my httpd.conf: NameVirtualHost serversip <VirtualHost serversip> DocumentRoot /home/mydomain1 ServerName mydomain.org </VirtualHost> <VirtualHost serversip> DocumentRoot /home/mydomain2 ServerName mydomain.us </VirtualHost> <VirtualHost serversip> DocumentRoot /home/mydomain2/test ServerName test.mydomain.us </VirtualHost> Now, my sub-domain doesn't even show up on the net. I have DNS records pointing the domains to the IPs, but it still doesn't work. Scott --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.498 / Virus Database: 297 - Release Date: 7/9/03 |
|
|||
|
"Scott Brown" <boringbr@xprt.net> wrote in message news:vh4lbp5mpk4b0d@corp.supernews.com... > Hello, > NameVirtualHost serversip > > <VirtualHost serversip> > DocumentRoot /home/mydomain1 > ServerName mydomain.org > </VirtualHost> > > <VirtualHost serversip> > DocumentRoot /home/mydomain2 > ServerName mydomain.us > </VirtualHost> > > <VirtualHost serversip> > DocumentRoot /home/mydomain2/test > ServerName test.mydomain.us > </VirtualHost> > Well I think I see the problem I have virtual hosts but I do not use them like you have mine are more like <VirtualHost www.mysite.org> DocumentRoot /home/mysite.org ServerName www.mysite.org </VirtualHost> Mike. |
|
|||
|
On Mon, 14 Jul 2003 00:02:24 -0700, The Other Guy responded to a post
from "Scott Brown" <boringbr@xprt.net> who wrote in alt.apache.configuration: >Hello, > For some reason, Apache isn't pointing each domain to a seperate folder, >this the last part of my httpd.conf: > >NameVirtualHost serversip > ><VirtualHost serversip> > DocumentRoot /home/mydomain1 > ServerName mydomain.org ></VirtualHost> > ><VirtualHost serversip> > DocumentRoot /home/mydomain2 > ServerName mydomain.us ></VirtualHost> > ><VirtualHost serversip> > DocumentRoot /home/mydomain2/test > ServerName test.mydomain.us ></VirtualHost> > > >Now, my sub-domain doesn't even show up on the net. > >I have DNS records pointing the domains to the IPs, but it still doesn't >work. > >Scott Try putting in a ServerAlias in each VH: <VirtualHost serversip> DocumentRoot /home/mydomain2 ServerName mydomain.us ServerAlias mydomain2 </VirtualHost> HTH TOG -- ../configure --prefix=~/zyterion Not this guy or that guy, The Other Guy. This spot may contain a satirical comment or comedic source, and is meant to be funny. If you are easily offended, gullible or don't have a sense of humour we suggest you read elsewhere. |
|
|||
|
Okay, I installed Apache 2.0.47, the virtual domains work. However, I have
make for example: a virtual host for mydomain.com and www.mydomain.com. If not, then they all get directed to the first virtual host directory. Also, subdomains like: linux.mydomain.com do not work, I set it up like www.mydomain.com, but it still doesn't work. From the servers command line (Ahh, got to love SSH) I can ping the subdomains just fine and view them fine in Lynx. Does that give a clue? Scott --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/03 |
|
|||
|
"Scott Brown" <boringbr@xprt.net> skrev i en meddelelse
news:vh8s3u3o292o38@corp.supernews.com... > Okay, I installed Apache 2.0.47, the virtual domains work. However, I have > make for example: a virtual host for mydomain.com and www.mydomain.com. If > not, then they all get directed to the first virtual host directory. Also, > subdomains like: linux.mydomain.com do not work, I set it up like > www.mydomain.com, but it still doesn't work. You need to use ServerAlias to add the domains you wish the virtualhost to answer to. *.mydomain.com catches all subdomains of mydomain.com Martin |
|
|||
|
"Scott Brown" <boringbr@xprt.net> skrev i en meddelelse
news:vh90h18iknec95@corp.supernews.com... > Thank you!! > That fixed the www problem. The subdomain problem still exists. Any good > ideas? Do you wish to catch all subdomains with one virtualhost? Martin |