Can't get Virtual Hosting working in Apache 1.3.9

Can't get Virtual Hosting working in Apache 1.3.9

Post by Matt McCarth » Tue, 15 May 2001 05:36:45



    Hi all.

    I registered two domain names and have had them lead to the same
DocumentRoot for some months now.  I finally decided to get around to
setting up virtual hosting, but I can't get it working.  Going to either
domain name just leads to the DocumentRoot for the default server rather
than looking up a specified VirtualHost DocumentRoot.  My VirtualHost
section of httpd.conf looks like this:

NameVirtualHost 192.168.12.86
<VirtualHost 192.168.12.86>
  ServerName           www.mostlycloudy.net
  ServerAlias              mostlycloudy.net *.mostlycloudy.net
  DocumentRoot   "/usr/www/mostlycloudy.net"
  ErrorLog        /var/log/apache/domain_mostlycloudy_error.log
  TransferLog     /var/log/apache/domain_mostlycloudy_access.log
  #ScriptAlias    /cgi-bin  /var/www/mostlycloudy/cgi-bin
</VirtualHost>
<VirtualHost 192.168.12.86>
  ServerName           www.arenacwc.com
  ServerAlias              arenacwc.com *.arenacwc.com
  DocumentRoot   "/usr/www/arenacwc.com"
  ErrorLog        /var/log/apache/domain_arenacwc_error.log
  TransferLog     /var/log/apache/domain_arenacwc_access.log
  #ScriptAlias    /cgi-bin  /var/www/arenacwc/cgi-bin
</VirtualHost>

    If it's any use to anyone trying to help me, there should be a link to a
directory containing copies of all my Apache configs if you go to either
domain name.

    So-- can anyone help me?  Thanks in advance.

 
 
 

Can't get Virtual Hosting working in Apache 1.3.9

Post by Joshua Sliv » Tue, 15 May 2001 07:32:55



>     Hi all.
>     I registered two domain names and have had them lead to the same
> DocumentRoot for some months now.  I finally decided to get around to
> setting up virtual hosting, but I can't get it working.  Going to either
> domain name just leads to the DocumentRoot for the default server rather
> than looking up a specified VirtualHost DocumentRoot.  My VirtualHost
> section of httpd.conf looks like this:
> NameVirtualHost 192.168.12.86
> <VirtualHost 192.168.12.86>
>   ServerName           www.mostlycloudy.net

Those ServerNames do not match with those IP addresses from the Internet.
Are you sure you are using the IP address that you should be using?

--
Joshua Slive

http://slive.ca/

 
 
 

1. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

Hello.

Have been running 1.2b8 for a intranet and decided to move upto 1.3b2. I
have several name based virtual hosts that have been working under
1.2b8. After compiling and installing 1.3b2 my virtual hosts do not
work. In fact what happens is that even though DocumentRoot and default
server name is different, eg: www.serverA.net pointing to /www/default,
Apache 1.3b2 will always take me to the first defined virtual host as if
it's locked to it no matter what virtual host I try to browse. What
gives? Please post and E-Mail.

In /etc/hosts for my machines IP address I have

A.B.C.D         www.default.net www.virtA.net www.virtB.net

In ../conf/httpd.conf I have;

<VirtualHost www.virtA.net>

DocumentRoot /usr/local/www/virtA
ServerName www.virtA.net
ErrorLog logs/virtA.error.log
TransferLog logs/virtA.access.log
</VirtualHost>

<VirtualHost www.virtB.net>

DocumentRoot /usr/local/www/virtB
ServerName www.virtB.net
ErrorLog logs/virtB.error.log
TransferLog logs/virtB.access.log
</VirtualHost>

--

2. NIS netgroup and mountd problems on RedHat 5.2

3. Help getting SSI to work on Apache for virtual hosts

4. How to Make a Linux Partition being Shown in osX?

5. .htaccess Apache Virtual host Won't Work

6. globs from a var?

7. APACHE Virtual Hosting: Done by the book, but still won't work!

8. kpilot from USB - what do I ln to /dev/pilot?

9. Virtual Hosts with Apache and dynamic dns won't work??

10. Virtual hosts don't work at all with Apache in SuSE 7.0

11. apache virtual hosts don't work with new kernel

12. htaccess Apache Virtual Host Won't Work

13. apache virtual hosts don't work with new kernel