httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: httpd.conf <VirtualHost> (repost)
Date Wed, 09 Jan 2002 13:22:03 GMT
Steve wrote:
> AFAIK (and I've been asking similar questions lately) port mapping has
> nothing to do with VirtualHosts. VirtualHosts are simple for pointing
> multiple URLs at one IP address/Machine.

Virtual Hosting is whenever a single instance of the webserver serves
two separate sites. It can be:

- name-based: Sites have different names but same IP and port
- port-based: sites have same IP but different ports
- IP-based: sites have different IPs 

Only for name-based do you need the NameVirtualHost directive. 

for example, consider the user's original question:

> > -> How can I set up my httpd.conf to accept requests for
> > and
> > using the same IP address?
> >
> > For instance: I forward/redirect two registered names to,
> > =
> > =
> >
> > 1> what would my NamveVirtualHost entry(s) look like


> > 2> what would my <VirtualHost> entry(s) look like?

  DocumentRoot /home/html/s-martin-stuff
  TransferLog  logs/s-martin_access_log

  DocumentRoot /home/html/martin-s-stuff
  TransferLog  logs/martin-s_access_log

> > Bonus question, How do I tell which request is coming? (i.e.
> > <or>

See use of different TransferLogs above.

PS: This assumes the user has different content to serve on the two
sites. If in fact they are just aliases of the same site then he only
needs one VH;

  DocumentRoot /home/html/s-martin-stuff
  TransferLog  logs/s-martin_access_log


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message