You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dean Maunder <de...@skynetmobile.com> on 2005/10/27 04:34:45 UTC
[users@httpd] Multiple virtual hosts
Is it possible to have multiple virtual names for a single host?
Something like:
<VirtualHost *:80>
DocumentRoot /usr/local/apache2/htdocs/www.mydomain.com
ServerName www.mydomain.com
ServerName www.other-mydomain.com
ServerAdmin webmaster@mydomain.com
ErrorLog logs/error_log_www
CustomLog "|/usr/local/apache2/bin/cronolog
/usr/local/apache2/logs/www-access_%Y-%m-%d" "combined" env=!dontlog
LogLevel emerg
</VirtualHost>
Or so I need to specify each independantly? Im trying to avoid this as
it's a case of having both a .com and a .com.au domain
Thanks
D.
---------------------------------------------------------------------
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] Multiple virtual hosts
Posted by Sean Brown <se...@gmail.com>.
On 10/26/05, Dean Maunder <de...@skynetmobile.com> wrote:
> Is it possible to have multiple virtual names for a single host?
> Something like:
> <VirtualHost *:80>
> DocumentRoot /usr/local/apache2/htdocs/www.mydomain.com
> ServerName www.mydomain.com
> ServerName www.other-mydomain.com
> ServerAdmin webmaster@mydomain.com
> ErrorLog logs/error_log_www
> CustomLog "|/usr/local/apache2/bin/cronolog
> /usr/local/apache2/logs/www-access_%Y-%m-%d" "combined" env=!dontlog
> LogLevel emerg
> </VirtualHost>
<VirtualHost 192.168.1.100:80>
ServerName mydomain.com:80
ServerAlias www.mydomain.com
ServerAlias blah.mydomain.com
UseCanonicalName Off
DocumentRoot /www/mydomain.com/www.mydomain.com/htdocs
</VirtualHost>
---------------------------------------------------------------------
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] Multiple virtual hosts
Posted by Dave Floyd <da...@pa.press.net>.
Dean,
http://httpd.apache.org/docs/2.0/mod/core.html#serveralias
rgds
>Is it possible to have multiple virtual names for a single host?
>Something like:
><VirtualHost *:80>
>DocumentRoot /usr/local/apache2/htdocs/www.mydomain.com
>ServerName www.mydomain.com
>ServerName www.other-mydomain.com
>ServerAdmin webmaster@mydomain.com
>ErrorLog logs/error_log_www
>CustomLog "|/usr/local/apache2/bin/cronolog
>/usr/local/apache2/logs/www-access_%Y-%m-%d" "combined" env=!dontlog
>LogLevel emerg
></VirtualHost>
>
>Or so I need to specify each independantly? Im trying to avoid this as
>it's a case of having both a .com and a .com.au domain
>Thanks
>D.
>
>---------------------------------------------------------------------
>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
---------------------------------------------------------------------
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