apache2
dave walker
dave at mudsite.com
Wed Jun 1 18:01:40 UTC 2005
Vram wrote:
> Hi
>
> I am trying to set up Multiple Domains with one IP...
>
> I am using apache2...
>
> And I followed the example that come with the doc....
>
> It dosen;t seen to work
>
>
> ##################### I copied this from the Apache2 doc..
> ##############They don't use httpd.conf
> ####### I put this in /etc/apache2/site-enabled/default
> ##########Didn't work...
>
> For example, suppose that you are serving the domain www.domain.tld
> and you wish to add the virtual host www.otherdomain.tld, which points
> at the same IP address. Then you simply add the following to httpd.conf:
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> ServerName www.domain.tld
> ServerAlias domain.tld *.domain.tld
> DocumentRoot /www/domain
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName www.otherdomain.tld
> DocumentRoot /www/otherdomain
> </VirtualHost>
>
>
> ########### I did all the stuff to try the example
> ############# made directories.
> #############did entries in /etc/hosts
> ##############All that stuff
>
>
>
>
> Any ideas on how to fix this
>
> Or if you are running apache2 ... How do you do virtual domains??
>
> TIA
>
> Vram
>
I would replace the * wth your IP address, and loose the :80. Other
than that I am not sure. Mine looks like such:
In "/etc/apache2/apache2.conf"
# Include the virtual host configurations:
NameVirtualHost xxx.xxx.xxx.xxx
Include /etc/apache2/sites-enabled/[^.#]*
In "/etc/apache2/sites-enabled/001-site1"
<VirtualHost xxx.xxx.xxx.xxx>
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin dave at domain.com
DocumentRoot /var/www/domain
<Directory /var/www/domain>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/domain/cgi-bin/
<Directory "/var/www/domain/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx>
ServerName gallery.domain.com
DocumentRoot /usr/share/gallery
<Directory /usr/share/gallery>
Order allow,deny
allow from all
</Directory>
</VirtualHost>
More information about the ubuntu-users
mailing list