[PLUG] apache2
Jim Karlock
Jkarlock at earthlink.net
Wed Jun 1 12:23:02 UTC 2005
At 08:43 PM 5/31/05 , you 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 ..so I don't know why they use
>this example
>####### 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 went through this a couple months back, so I don't recall the details.
The key is that there is a second place that you have to make entries in
the httpd.conf file.
I don't have time to look right now because that machine is down stairs and
I haven't looked at it in months. It just sits there and works, unlike the
windows that I am writing this on.
I checked a copy of the httpd.conf on my pendrive, which may not be
current, but it has the following:
### Section 3: Virtual Hosts
#
. . . . . . (left out stuff)
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
. . . . . . (left out stuff)
<VirtualHost *:80>
ServerName 209.210.229.130
DocumentRoot /var/www/html
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
</VirtualHost>
# Virtual host Virtual Host 0
<VirtualHost *:80>
ServerName www.schoppformetro.com
ServerAlias schoppformetro.com
DocumentRoot /var/www/w-schopp/html
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
I think that all that only serverName, ServerAlias and DocumnetRoot are
required.
My biggest problem getting it to work turned out to be permissions. (pay
close attention to the content of error messages)
If this doesn't solve your problem, let me know & I will get you a copy of
the whole file from the machine.
Good luck JK
>_______________________________________________
>PLUG mailing list
>PLUG at lists.pdxlinux.org
>http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list