httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Southwell <da...@vizion2000.net>
Subject Re: [users@httpd] VirtualHost Issues
Date Thu, 19 Apr 2007 17:31:55 GMT
On Thursday 19 April 2007 09:37:19 Matt Fielding wrote:
> Hello, I am new to this group and asking my first question, hopefully I
> explain it with enough detail.
>
> I have two domains hosted via dyndns.org pointing to a server I run in my
> house, I am running WAMP5 off it, and trying to configure both my domains
> to point to different directories on the apache server using VirtualHost.
> For some reason, whichever VirtualHost I list first is being used, but the
> other is getting ignored. The following are the two VirtualHost entries I
> have entered into the http.conf file. Any help is appreciated in getting
> this to work correctly.
>
> <VirtualHost *>
>     ServerAdmin itzmattu@gmail.com
>     DocumentRoot "C:/Documents and Settings/Owner/Desktop/htdocs/ong/"
>     ServerName ong.kicks-ass.net
> </VirtualHost>
> <VirtualHost *>
>     ServerAdmin itzmattu@gmail.com
>     DocumentRoot "C:/Documents and Settings/Owner/Desktop/htdocs/"
>     ServerName mattu.isa-geek.com
> </VirtualHost>

with server root set as /usr/local/ In hhtpd.conf and the command:
Include etc/apache22/Includes/*.conf

here is an example of one of my virtual host settings that are is in
etc/apache22/includes/virtual

<VirtualHost *:80>
	DocumentRoot /usr/virtualwebs/my.domain.net
	ServerName www.my.domain.net
        Options Indexes
	AcceptPathInfo On
	ServerAdmin webmaster@my.domain.net
	AddDefaultCharset utf-8
	ScriptAlias /mailman "/usr/local/mailman/cgi-bin"
	Alias /pipermail "/usr/local/mailman/archives/public"
	Alias /icons/ "/usr2/virtualwebs/icons/"	
</VirtualHost>
# Now make sure apache has access to every directory it needs with an entry 
like:
<Directory /usr/virtualwebs/my.domain.net/>
	order allow,deny
	allow from all
</Directory>
# repeat that for any directories pointed to by an Alia directive

so a second one follows the same pattern:
<VirtualHost *:80>
	DocumentRoot /usr/virtualwebs/my.domain2.net
	ServerName www.my.domain2.net
        Options Indexes
	AcceptPathInfo On
	ServerAdmin webmaster@my.domain2.net
	AddDefaultCharset utf-8
	ScriptAlias /mailman "/usr/local/mailman/cgi-bin"
	Alias /pipermail "/usr/local/mailman/archives/public"
	Alias /icons/ "/usr2/virtualwebs/icons/"	
</VirtualHost>
<Directory /usr/virtualwebs/my.domain2.net/>
	order allow,deny
	allow from all
</Directory>

david

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


Mime
View raw message