Virtual domains -- Help!

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-14-2003
Scott Brown
 
Posts: n/a
Default Virtual domains -- Help!

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


  #2 (permalink)  
Old 07-14-2003
Michael Forster
 
Posts: n/a
Default Re: Virtual domains -- Help!


"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.


  #3 (permalink)  
Old 07-14-2003
The Other Guy
 
Posts: n/a
Default Re: Virtual domains -- Help!

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.
  #4 (permalink)  
Old 07-15-2003
Scott Brown
 
Posts: n/a
Default Re: Virtual domains -- Help!

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


  #5 (permalink)  
Old 07-15-2003
Martin C. Petersen
 
Posts: n/a
Default Re: Virtual domains -- Help!

"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


  #6 (permalink)  
Old 07-16-2003
Martin C. Petersen
 
Posts: n/a
Default Re: Virtual domains -- Help!

"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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:56 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0