You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Wagar <ew...@yahoo.com> on 2002/12/30 23:57:14 UTC

[users@httpd] VirtualHost and main setup

I'd like to set up the main area of my Apache server
to serve out requests for the IP #.  I currently have
the main area setup exactly like that of a VirtualHost
area, which servers up a domain.  (I'd like this
feature for easier maintenance.)

Or, I'd like everything enclosed within a VirtualHost
bucket.

I don't think the latter idea is feasible since Apache
will not know what to listen to/for.

Any ideas/leads are greatly appreciated!

Thanks
eric

=====
eric wagar
glxvr623 on AIM
thebimmer@hotmail.com on MSN

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost and main setup

Posted by "J. Greenlees" <ja...@shaw.ca>.

Eric Wagar wrote:
> I'd like to set up the main area of my Apache server
> to serve out requests for the IP #.  I currently have
> the main area setup exactly like that of a VirtualHost
> area, which servers up a domain.  (I'd like this
> feature for easier maintenance.)
> 
> Or, I'd like everything enclosed within a VirtualHost
> bucket.
> 
> I don't think the latter idea is feasible since Apache
> will not know what to listen to/for.
> 
> Any ideas/leads are greatly appreciated!
[quote]
Boyle Owen:
There are two ways you can go - depending on whether you want to declare
many aliases for your IP in DNS...

(1) If you do not mind paying for many Domain-Names which resolve to
your IP, then:

Use Name-based VirtualHosts, like this (assume your IP = 192.168.1.1 and
your sites are called www.site1.com, www.site2.com etc..):

	NameVirtualHost 192.168.1.1

	<VirtualHost 192.168.1.1>
	  ServerName www.site1.com
	  DocumentRoot /home/site1/html
	  ... etc.
	</VirtualHost>

	<VirtualHost 192.168.1.1>
	  ServerName www.site2.com
	  DocumentRoot /home/site2/html
	  ... etc.
	</VirtualHost>

(2) Alternatively, if you can have only one Domain Name, use Aliases to
separate the document roots, e.g. (assuming your FQDN is www.mysite.com)

	Listen 192.168.1.1
	ServerName www.mysite.com
	DocumentRoot /home/default/html

	Alias /site1 /home/site1/html
	<Directory /home/site1/html>
	  Allow from all
	</Directory>

	Alias /site2 /home/site2/html
	<Directory /home/site2/html>
	  Allow from all
	</Directory>

Now http://www.mysite.com/site1 will go to /home/site1/html etc. NB
/home/default/html is necessary - this is where www.mysite.com ends up
(you can just put a simple page there with links to the other sites).

Rgds,

Owen Boyle




 >-----Original Message-----
 >From: Baptiste MILLE-MATHIAS
 >[mailto:Baptiste.MILLE-MATHIAS@navlink.com]
 >Sent: Montag, 9. Dezember 2002 05:21
 >To: users@httpd.apache.org
 >Subject: RE: [users@httpd] Specific Configuration
 >
 >
 >Ok sorry my english is quite horrible..
 >
 >I have a server staff.mydomain.com and I want ot set up my web
 >server in
 >order the sites have this address.
 >
 >http://staff.mydomain.com/site-name
 >
 >I have one IP addresse for the web server. I see some
 >informations avout
 >VitualHost but I don't know, if I can configure apache to
 >support that type
 >of URL.
 >
 >the second condition, is that is site must have an independant
 >configuration, so that's why I can't use UserDir.
 >
 >Thanks for your help
 >
 >Baptiste
 >
 >-----Original Message-----
 >From: ncool007 [mailto:ncool007@optonline.net]
 >Sent: lundi 9 decembre 2002 05:12
 >To: users@httpd.apache.org
 >Subject: Re: [users@httpd] Specific Configuration
 >
 >
 >umm. please try rephrasing your question... i think you're
 >talking about
 >NameVirtualHost but I'm not sure.  if you're really a newbie maybe you
 >should look into buying a book like Professional Apache 2.0 to
 >help you,
 >it's a great reference.
 >
 >At 03:43 AM 12/9/2002 +0100, you wrote:

 >>Hello Everybody.
 >>
 >>I new to this list and i'm new to apache configuration.
 >>I need help to set up a server for the homepages of

 >corporate, as follow:

 >>
 >>http://staff.mydomain.com/site_name
 >>
 >>and I would like that each site to be independant in the

 >configuration,

 >>because I have to set up specific Alias or DocumentRoot for

 >some of them.

 >>How can I do? do I have to use <Directory> or another thing?
 >>
 >>I think you've understand I a newbie.
 >>
 >>Thanks for your help.
 >>
 >>Baptiste
[/quote]

I'm sure this will help. ;-)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org