You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ja...@jsquared.ca on 2002/08/01 15:58:05 UTC

VirtualHosting

Hello, I've been working with the O'Reilly Using Apache manual to host
two websites using one invocation of httpd with <VirtualHost>.
 
User www
Group www
 
NameVirtualHost 24.141.11.74
 
<VirtualHost www.jsquared.ca>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.trebas/htdocs
ServerName www.jsquared.ca
ErrorLog /var/www/site.trebas/logs/error_log
TransferLog /var/www/site.trebas/logs/access_log
</VirtualHost>
 
<VirtualHost www.bozack.com>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.bozack/htdocs
ServerName www.bozack.com
ErrorLog /home/ftp/www/site.bozack/logs/error_log
TransferLog /home/ftp/www/site.bozack/logs/access_log
</VirtualHost>
 
Both domains return the first site.  I expected that Apache would
examine the headers of the http request and return the requested site
based on the name.  Do I have to set up multiple local IPs on my machine
and put each separate IP in each VirtualHost block? Can anyone tell me
what I am doing wrong?
 
Thanks a lot!!
 
James Herschel
JSquared Network Solutions
(905)847-0799
james@jsquared.ca
 

Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ron brings up a point: what version of Apache are you running?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting --- BIND

Posted by Ron Wingfield <rt...@archaxis.net>.
Is this question for me (Ron W.) or James?  
My OS is FreeBSD 4.5; Apache v2.0.28; BIND v8.2.4; 
. . .and yes, my forward mapping db's point to the IP address.
Forgive me if my terminology is weak or incorrect.  I'm still
learning BIND, . . .and I may go to something else.

OTTF,
Ron W.
  ----- Original Message ----- 
  From: Jay States 
  To: users@httpd.apache.org 
  Sent: Thursday, August 01, 2002 11:11 AM
  Subject: Re: VirtualHosting --- BIND


  Question? What operating system are you using?  It sounds that problem 
  is with your DNS, did you bind that address to the domain name on your 
  inside network.

  J


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  For additional commands, e-mail: users-help@httpd.apache.org



Re: VirtualHosting --- BIND

Posted by Jay States <js...@mac.com>.
Question? What operating system are you using?  It sounds that problem 
is with your DNS, did you bind that address to the domain name on your 
inside network.

J


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Ron Wingfield <rt...@archaxis.net>.
  Both domains return the first site.  I expected that Apache would examine
  the headers of the http request and return the requested site based on the
  name.  Do I have to set up multiple local IPs on my machine and put each
  separate IP in each VirtualHost block? Can anyone tell me what I am doing
  wrong?
Here's my two cents:  Granted that I STILL need to upgrade from 2.0.28, 
I would say "NO" to your question regarding separate IP's.
I cannot get my virtual hosts to serve unless I specify (using the asterisks):
    
    <VirtualHost *>
        ErrorLog logs/archaxis_error_log
        CustomLog logs/archaxis_access_log common
    </VirtualHost>

    <VirtualHost *>
        DocumentRoot /www/vhosts/ClassXBoats.com
        ServerName ClassXBoats.com
        ServerAlias www.ClassXBoats.com
    </VirtualHost>

etc. (i.e., additional VirtualHost containers)

If I specify the common static IP address assigned to the primary server (archaxis.net)
and the virtuals (e.g., ClassXBoats.com), then only the index.htm for archaxis.net will
be served.   . . .Why?  Can someone comment, please?

OTTF,
Ron W.

Re: VirtualHosting

Posted by Herb Stein <he...@herbstein.com>.
----- Original Message -----
From: james@jsquared.ca
To: users@httpd.apache.org
Sent: Thursday, August 01, 2002 8:58 AM
Subject: VirtualHosting


Hello, I've been working with the O'Reilly Using Apache manual to host two
websites using one invocation of httpd with <VirtualHost>.

User www
Group www

NameVirtualHost 24.141.11.74

<VirtualHost www.jsquared.ca>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.trebas/htdocs
ServerName www.jsquared.ca
ErrorLog /var/www/site.trebas/logs/error_log
TransferLog /var/www/site.trebas/logs/access_log
</VirtualHost>

<VirtualHost www.bozack.com>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.bozack/htdocs
ServerName www.bozack.com
ErrorLog /home/ftp/www/site.bozack/logs/error_log
TransferLog /home/ftp/www/site.bozack/logs/access_log
</VirtualHost>

Both domains return the first site.  I expected that Apache would examine
the headers of the http request and return the requested site based on the
name.  Do I have to set up multiple local IPs on my machine and put each
separate IP in each VirtualHost block? Can anyone tell me what I am doing
wrong?

Thanks a lot!!

James Herschel
JSquared Network Solutions
(905)847-0799
james@jsquared.ca

I'm sure I'll be corrected if I'm wrong, but I have the IP address in the
VirtualHost container. ServerName identifies the virtual.
--
Herb Stein
The Herb Stein Group
www.herbstein.com
herb@herbstein.com
314 952-4601




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
james@jsquared.ca wrote:
> 
> I changed the <VirtualHost 24.141.11.74> back to <VirtualHost
> www.jsquared.ca/www.bozack.com> and now it brings up the
> www.jsquared.ca site no matter which domain I browse to.
> 
> Wouldn't this imply that I'm halfway there now and that the
> domain names do indeed have to be in the <VirtualHost ...> block?

It means that Apache still isn't correctly figuring out which
vhost applies, and so it assigning the request to the first one
defined. (documented behaviour)  We need to figure out *why*
it's not figuring things out.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHosting

Posted by ja...@jsquared.ca.
I changed the <VirtualHost 24.141.11.74> back to <VirtualHost
www.jsquared.ca/www.bozack.com> and now it brings up the www.jsquared.ca
site no matter which domain I browse to.

Wouldn't this imply that I'm halfway there now and that the domain names
do indeed have to be in the <VirtualHost ...> block?

James Herschel
JSquared Network Solutions
(905)847-0799
james@jsquared.ca


-----Original Message-----
From: Rodent of Unusual Size [mailto:Ken.Coar@Golux.Com] 
Sent: Thursday, August 01, 2002 11:17 AM
To: users@httpd.apache.org
Subject: Re: VirtualHosting

Rodent of Unusual Size wrote:
> 
> He had that before.  It shouldn't make any difference,
> and in fact it's generally preferable to use the IPA in
> the <VirtualHost> line rather than an FQHN.

Sorry if that sounded like a put-down; it wasn't meant to.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rodent of Unusual Size wrote:
> 
> He had that before.  It shouldn't make any difference,
> and in fact it's generally preferable to use the IPA in
> the <VirtualHost> line rather than an FQHN.

Sorry if that sounded like a put-down; it wasn't meant to.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
EdwardSPL@ita.org.mo wrote:
> 
> try <<VirtualHost www.jsquared.ca>
> try <VirtualHost www.bozack.com>

He had that before.  It shouldn't make any difference,
and in fact it's generally preferable to use the IPA in
the <VirtualHost> line rather than an FQHN.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Ed...@ita.org.mo.
james@jsquared.ca wrote:

> I have since changed my httpd.conf to:
>
> NameVirtualHost 24.141.11.74
>
> <VirtualHost 24.141.11.74>

try <<VirtualHost www.jsquared.ca>

> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName www.jsquared.ca
> ErrorLog /home/ftp/www/site.trebas/logs/error_log
> TransferLog /home/ftp/www/site.trebas/logs/access_log
> </VirtualHost>
>
> <VirtualHost 24.141.11.74>

try <VirtualHost www.bozack.com>

> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName www.bozack.com
> ErrorLog /home/ftp/www/site.bozack/logs/error_log
> TransferLog /home/ftp/www/site.bozack/logs/access_log
> </VirtualHost>
>
> and now have the issue where I have restarted the server and now both
> domains return
>
> Index of /
>
> . Parent Directory.
>
> For some strange reason, the domains both look to my /var/www/htdocs
> folder instead of the DocumentRoot path I have specified!! (I have chmod
> 777'd the dirs to eliminate the possibility of permission trouble)
>
> Why isn't it pointing to the folders I specified?
>
> James Herschel
> JSquared Network Solutions
> (905)847-0799
> james@jsquared.ca



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
james@jsquared.ca wrote:
> 
> FYI - I am behind a Linksys router with portforwarding set for 80 -->
> 192.168.0.1 (apache)

Um, that's rather critical information..  what IP address is actually
assigned to this system???
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Jack Nerad <jn...@cimedia.com>.
james@jsquared.ca wrote:
> A friend suggested that I put them in there and I had them pointing to
> 192.168.0.1 which could definitely throw things off - I have since
> removed them.
> 
> As of right now - both sites return the index.html in /var/www/htdocs
> 
> My error_log is only showing up in /var/www/logs - and I am not seeing
> anything out of the ordinary
> 
> [httpd.conf]
> 
> User www
> Group www 
> NameVirtualHost 24.141.11.74 
> 
> <VirtualHost 24.141.11.74>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName www.jsquared.ca
> ErrorLog /home/ftp/www/site.trebas/logs/error_log
> TransferLog /home/ftp/www/site.trebas/logs/access_log
> </VirtualHost>
> 
> <VirtualHost 24.141.11.74>
> ServerAdmin james@jsquared.ca 
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName www.bozack.com 
> ErrorLog /home/ftp/www/site.bozack/logs/error_log
> TransferLog /home/ftp/www/site.bozack/logs/access_log
> </VirtualHost>
> 
> [/etc/hosts]
> 127.0.0.1 localhost
> 192.168.0.1 burnt burnt.bizzle.com
> 192.168.0.2 blism
> 
> My httpd.conf is basic just so I can eliminate _everything_ and figure
> out what the hell is going on ;-)
> 
> FYI - I am behind a Linksys router with portforwarding set for 80 -->
> 192.168.0.1 (apache)

Heh.  That will probably do it.  Try the *'s instead of the IP 
addresses, as Ron and others have suggested.

> 
> Damn, I'm almost ready to put a sniffer on the line and check the HTTPD
> requests
> 
--
Jack Nerad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Herb Stein <he...@herbstein.com>.
----- Original Message ----- 
From: <ja...@jsquared.ca>
To: <us...@httpd.apache.org>
Sent: Thursday, August 01, 2002 10:48 AM
Subject: RE: VirtualHosting


> A friend suggested that I put them in there and I had them pointing to
> 192.168.0.1 which could definitely throw things off - I have since
> removed them.
> 
> As of right now - both sites return the index.html in /var/www/htdocs
> 
> My error_log is only showing up in /var/www/logs - and I am not seeing
> anything out of the ordinary
> 
> [httpd.conf]
> 
> User www
> Group www 
> NameVirtualHost 24.141.11.74 
> 
> <VirtualHost 24.141.11.74>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName www.jsquared.ca
> ErrorLog /home/ftp/www/site.trebas/logs/error_log
> TransferLog /home/ftp/www/site.trebas/logs/access_log
> </VirtualHost>
> 
> <VirtualHost 24.141.11.74>
> ServerAdmin james@jsquared.ca 
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName www.bozack.com 
> ErrorLog /home/ftp/www/site.bozack/logs/error_log
> TransferLog /home/ftp/www/site.bozack/logs/access_log
> </VirtualHost>
> 
> [/etc/hosts]
> 127.0.0.1 localhost
> 192.168.0.1 burnt burnt.bizzle.com
> 192.168.0.2 blism
> 
> My httpd.conf is basic just so I can eliminate _everything_ and figure
> out what the hell is going on ;-)
> 
> FYI - I am behind a Linksys router with portforwarding set for 80 -->
> 192.168.0.1 (apache)
> 
> Damn, I'm almost ready to put a sniffer on the line and check the HTTPD
> requests
Your httpd.conf looks ok. From here, I get www.jsquared.ca fine.
 www.bozack.com comes up with a bad link, but a very different
page that the other one.

--
Herb Stein
The Herb Stein Group
www.herbstein.com
herb@herbstein.com
314 952-4601




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHosting

Posted by ja...@jsquared.ca.
A friend suggested that I put them in there and I had them pointing to
192.168.0.1 which could definitely throw things off - I have since
removed them.

As of right now - both sites return the index.html in /var/www/htdocs

My error_log is only showing up in /var/www/logs - and I am not seeing
anything out of the ordinary

[httpd.conf]

User www
Group www 
NameVirtualHost 24.141.11.74 

<VirtualHost 24.141.11.74>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.trebas/htdocs
ServerName www.jsquared.ca
ErrorLog /home/ftp/www/site.trebas/logs/error_log
TransferLog /home/ftp/www/site.trebas/logs/access_log
</VirtualHost>

<VirtualHost 24.141.11.74>
ServerAdmin james@jsquared.ca 
DocumentRoot /home/ftp/www/site.bozack/htdocs
ServerName www.bozack.com 
ErrorLog /home/ftp/www/site.bozack/logs/error_log
TransferLog /home/ftp/www/site.bozack/logs/access_log
</VirtualHost>

[/etc/hosts]
127.0.0.1 localhost
192.168.0.1 burnt burnt.bizzle.com
192.168.0.2 blism

My httpd.conf is basic just so I can eliminate _everything_ and figure
out what the hell is going on ;-)

FYI - I am behind a Linksys router with portforwarding set for 80 -->
192.168.0.1 (apache)

Damn, I'm almost ready to put a sniffer on the line and check the HTTPD
requests



-----Original Message-----
From: Rodent of Unusual Size [mailto:Ken.Coar@Golux.Com] 
Sent: Thursday, August 01, 2002 11:28 AM
To: users@httpd.apache.org
Subject: Re: VirtualHosting

james@jsquared.ca wrote:
> 
> Yessir, I put an index.html in my /var/www/htdocs to test that - if
you
> go to either domain you'll see 'dumb' ;-)

Right, so that's the verification we needed.

> When I make a bad request to either domain nothing shows up in my
> error_log

That's very odd indeed.  This might be because you don't have a
global error log.  Try adding an 'ErrorLog logs/error_log.global'
line before the first <VirtualHost>.

> That is my complete httpd.conf - here it is again as is ...

What, no LoadModule, AddType, ServerType, or other usual
directives??

> PS - could any of my issues be traced back to virtual ip's or entries
in
> /etc/hosts?

Huh, that's a thought.  *Do* you have any entries for www.jsquared.ca
or www.bozack.com in your /etc/hosts file?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
james@jsquared.ca wrote:
> 
> Yessir, I put an index.html in my /var/www/htdocs to test that - if you
> go to either domain you'll see 'dumb' ;-)

Right, so that's the verification we needed.

> When I make a bad request to either domain nothing shows up in my
> error_log

That's very odd indeed.  This might be because you don't have a
global error log.  Try adding an 'ErrorLog logs/error_log.global'
line before the first <VirtualHost>.

> That is my complete httpd.conf - here it is again as is ...

What, no LoadModule, AddType, ServerType, or other usual
directives??

> PS - could any of my issues be traced back to virtual ip's or entries in
> /etc/hosts?

Huh, that's a thought.  *Do* you have any entries for www.jsquared.ca
or www.bozack.com in your /etc/hosts file?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Jack Nerad <jn...@cimedia.com>.
james@jsquared.ca wrote:
> I am using 1.3.19

> Should the IP specified in <virtualhost ... > and NameVirtualHost be my
> external (that requests come in on) or internal IP(that apache is
> running on)?

http://httpd.apache.org/docs/mod/core.html#namevirtualhost

".... In cases where a firewall or other proxy receives the requests and 
forwards them on a different IP address to the server, you must specify 
the IP address of the physical interface on the machine which will be 
servicing the requests."

--
Jack Nerad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHosting

Posted by ja...@jsquared.ca.
I am using 1.3.19

My issues with 2.0 run long and deep ... there may be a conflict between
me installing 2.0 over 1.3.19 - what I'd love to do is completely remove
_any_ and _all_ apache files from my server and reinstall again from
scratch with 2.0.39

The problem being of course that I installed from source and have no
(don't know where to get) a list of files that apache installs.

If anyone could help out with that - I'll clean up my server and
reinstall from source...

Should the IP specified in <virtualhost ... > and NameVirtualHost be my
external (that requests come in on) or internal IP(that apache is
running on)?

James Herschel
JSquared Network Solutions
(905)847-0799
james@jsquared.ca


-----Original Message-----
From: Jack Nerad [mailto:jnerad@cimedia.com] 
Sent: Thursday, August 01, 2002 11:42 AM
To: users@httpd.apache.org
Subject: Re: VirtualHosting

james@jsquared.ca wrote:
> Yessir, I put an index.html in my /var/www/htdocs to test that - if
you
> go to either domain you'll see 'dumb' ;-)
> 
> When I make a bad request to either domain nothing shows up in my
> error_log
> 

Don't forget that you've set up different logging for each vhost.  Are 
they both empty?

--
Jack Nerad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Jack Nerad <jn...@cimedia.com>.
james@jsquared.ca wrote:
> Yessir, I put an index.html in my /var/www/htdocs to test that - if you
> go to either domain you'll see 'dumb' ;-)
> 
> When I make a bad request to either domain nothing shows up in my
> error_log
> 

Don't forget that you've set up different logging for each vhost.  Are 
they both empty?

--
Jack Nerad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHosting

Posted by ja...@jsquared.ca.
Yessir, I put an index.html in my /var/www/htdocs to test that - if you
go to either domain you'll see 'dumb' ;-)

When I make a bad request to either domain nothing shows up in my
error_log

That is my complete httpd.conf - here it is again as is ...

User www
Group www 
NameVirtualHost 24.141.11.74 #(external IP)

<VirtualHost 24.141.11.74>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.trebas/htdocs
ServerName www.jsquared.ca
ErrorLog /home/ftp/www/site.trebas/logs/error_log
TransferLog /home/ftp/www/site.trebas/logs/access_log
</VirtualHost>

<VirtualHost 24.141.11.74>
ServerAdmin james@jsquared.ca 
DocumentRoot /home/ftp/www/site.bozack/htdocs
ServerName www.bozack.com 
ErrorLog /home/ftp/www/site.bozack/logs/error_log
TransferLog /home/ftp/www/site.bozack/logs/access_log
</VirtualHost>

Again - thanks for your help! ;-)

PS - could any of my issues be traced back to virtual ip's or entries in
/etc/hosts?

-----Original Message-----
From: Jack Nerad [mailto:jnerad@cimedia.com] 
Sent: Thursday, August 01, 2002 10:53 AM
To: users@httpd.apache.org
Subject: Re: VirtualHosting

Rodent of Unusual Size wrote:
> james@jsquared.ca wrote:
> 
>>and now have the issue where I have restarted the server and now both
>>domains return
>>
>>Index of /
>>
>>. Parent Directory.
>>
>>For some strange reason, the domains both look to my /var/www/htdocs
>>folder instead of the DocumentRoot path I have specified!!
> 
> 
> How do you know it's the /var/www/htdocs directory?  If you put
> a file there, does it show up in the above listing?
> 
> Your configuration looks correct as far as it goes; can you post
> your complete httpd.conf file on a Web site and the URL?

good advice.

If you make known bogus requests to

http://www.jsquared.ca/foo
http://www.bozack.com/foo

What do the error_logs report?

--
Jack Nerad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Jack Nerad <jn...@cimedia.com>.
Rodent of Unusual Size wrote:
> james@jsquared.ca wrote:
> 
>>and now have the issue where I have restarted the server and now both
>>domains return
>>
>>Index of /
>>
>>. Parent Directory.
>>
>>For some strange reason, the domains both look to my /var/www/htdocs
>>folder instead of the DocumentRoot path I have specified!!
> 
> 
> How do you know it's the /var/www/htdocs directory?  If you put
> a file there, does it show up in the above listing?
> 
> Your configuration looks correct as far as it goes; can you post
> your complete httpd.conf file on a Web site and the URL?

good advice.

If you make known bogus requests to

http://www.jsquared.ca/foo
http://www.bozack.com/foo

What do the error_logs report?

--
Jack Nerad


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
james@jsquared.ca wrote:
> 
> and now have the issue where I have restarted the server and now both
> domains return
> 
> Index of /
> 
> . Parent Directory.
> 
> For some strange reason, the domains both look to my /var/www/htdocs
> folder instead of the DocumentRoot path I have specified!!

How do you know it's the /var/www/htdocs directory?  If you put
a file there, does it show up in the above listing?

Your configuration looks correct as far as it goes; can you post
your complete httpd.conf file on a Web site and the URL?
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHosting

Posted by ja...@jsquared.ca.
I have since changed my httpd.conf to:

NameVirtualHost 24.141.11.74

<VirtualHost 24.141.11.74>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.trebas/htdocs
ServerName www.jsquared.ca
ErrorLog /home/ftp/www/site.trebas/logs/error_log
TransferLog /home/ftp/www/site.trebas/logs/access_log
</VirtualHost>

<VirtualHost 24.141.11.74>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.bozack/htdocs
ServerName www.bozack.com
ErrorLog /home/ftp/www/site.bozack/logs/error_log
TransferLog /home/ftp/www/site.bozack/logs/access_log
</VirtualHost>

and now have the issue where I have restarted the server and now both
domains return 

Index of /

. Parent Directory.

For some strange reason, the domains both look to my /var/www/htdocs
folder instead of the DocumentRoot path I have specified!! (I have chmod
777'd the dirs to eliminate the possibility of permission trouble)

Why isn't it pointing to the folders I specified?

James Herschel
JSquared Network Solutions
(905)847-0799
james@jsquared.ca


-----Original Message-----
From: Jack Nerad [mailto:jnerad@cimedia.com] 
Sent: Thursday, August 01, 2002 10:13 AM
To: users@httpd.apache.org
Subject: Re: VirtualHosting

james@jsquared.ca wrote:
> Hello, I've been working with the O'Reilly Using Apache manual to host
> two websites using one invocation of httpd with <VirtualHost>.
>  
> User www
> Group www
>  
> NameVirtualHost 24.141.11.74
>  
> <VirtualHost www.jsquared.ca>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName www.jsquared.ca
> ErrorLog /var/www/site.trebas/logs/error_log
> TransferLog /var/www/site.trebas/logs/access_log
> </VirtualHost>
>  



> <VirtualHost www.bozack.com>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName www.bozack.com
> ErrorLog /home/ftp/www/site.bozack/logs/error_log
> TransferLog /home/ftp/www/site.bozack/logs/access_log
> </VirtualHost>
>  
> Both domains return the first site.  I expected that Apache would
> examine the headers of the http request and return the requested site
> based on the name.  Do I have to set up multiple local IPs on my
machine
> and put each separate IP in each VirtualHost block? Can anyone tell me
> what I am doing wrong?

http://httpd.apache.org/docs/vhosts/name-based.html

You are trying to do name based virtual hosting.  This is distinguished 
from IP based virtual hosts, in which it appears to be legal to put in 
the fqdn of the server in the VirtualHost section.  From what I can 
glean from the name based virtual host document, it seems that you have 
to either use a * or the IP address (_not_ the fqdn) of the server in 
the <VirtualHost> directive.

"The argument to the <VirtualHost> directive should be the same as the 
argument to the NameVirtualHost directive (ie, an IP address, or * for 
all addresses."

--
Jack Nerad



>  
> Thanks a lot!!
>  
> James Herschel
> JSquared Network Solutions
> (905)847-0799
> james@jsquared.ca
>  
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: VirtualHosting

Posted by Jack Nerad <jn...@cimedia.com>.
james@jsquared.ca wrote:
> Hello, I've been working with the O'Reilly Using Apache manual to host
> two websites using one invocation of httpd with <VirtualHost>.
>  
> User www
> Group www
>  
> NameVirtualHost 24.141.11.74
>  
> <VirtualHost www.jsquared.ca>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.trebas/htdocs
> ServerName www.jsquared.ca
> ErrorLog /var/www/site.trebas/logs/error_log
> TransferLog /var/www/site.trebas/logs/access_log
> </VirtualHost>
>  



> <VirtualHost www.bozack.com>
> ServerAdmin james@jsquared.ca
> DocumentRoot /home/ftp/www/site.bozack/htdocs
> ServerName www.bozack.com
> ErrorLog /home/ftp/www/site.bozack/logs/error_log
> TransferLog /home/ftp/www/site.bozack/logs/access_log
> </VirtualHost>
>  
> Both domains return the first site.  I expected that Apache would
> examine the headers of the http request and return the requested site
> based on the name.  Do I have to set up multiple local IPs on my machine
> and put each separate IP in each VirtualHost block? Can anyone tell me
> what I am doing wrong?

http://httpd.apache.org/docs/vhosts/name-based.html

You are trying to do name based virtual hosting.  This is distinguished 
from IP based virtual hosts, in which it appears to be legal to put in 
the fqdn of the server in the VirtualHost section.  From what I can 
glean from the name based virtual host document, it seems that you have 
to either use a * or the IP address (_not_ the fqdn) of the server in 
the <VirtualHost> directive.

"The argument to the <VirtualHost> directive should be the same as the 
argument to the NameVirtualHost directive (ie, an IP address, or * for 
all addresses."

--
Jack Nerad



>  
> Thanks a lot!!
>  
> James Herschel
> JSquared Network Solutions
> (905)847-0799
> james@jsquared.ca
>  
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHosting

Posted by ja...@jsquared.ca.
I apologize, I had restarted the server and received no error message,
but the service did not restart.  I have restarted the server and now
both domains return 

Index of /

. Parent Directory.

I have chmod 777'd the site.* directory and I still can't see anything -
In fact it is still looking to my /var/www/htdocs folder!!

Why isn't it pointing to the folders I specified?

Thank you!!

-----Original Message-----
From: James Herschel [mailto:jdh34@cogeco.ca] On Behalf Of
james@jsquared.ca
Sent: Thursday, August 01, 2002 9:58 AM
To: users@httpd.apache.org
Subject: VirtualHosting

Hello, I've been working with the O'Reilly Using Apache manual to host
two websites using one invocation of httpd with <VirtualHost>.

User www
Group www

NameVirtualHost 24.141.11.74

<VirtualHost www.jsquared.ca>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.trebas/htdocs
ServerName www.jsquared.ca
ErrorLog /var/www/site.trebas/logs/error_log
TransferLog /var/www/site.trebas/logs/access_log
</VirtualHost>

<VirtualHost www.bozack.com>
ServerAdmin james@jsquared.ca
DocumentRoot /home/ftp/www/site.bozack/htdocs
ServerName www.bozack.com
ErrorLog /home/ftp/www/site.bozack/logs/error_log
TransferLog /home/ftp/www/site.bozack/logs/access_log
</VirtualHost>

Both domains return the first site.  I expected that Apache would
examine the headers of the http request and return the requested site
based on the name.  Do I have to set up multiple local IPs on my machine
and put each separate IP in each VirtualHost block? Can anyone tell me
what I am doing wrong?

Thanks a lot!!

James Herschel
JSquared Network Solutions
(905)847-0799
james@jsquared.ca



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org