Problems whith virtual host

Problems whith virtual host

Post by Arnaud Moular » Wed, 30 Sep 1998 04:00:00



Hi, my apache server is 1.3.1
        I try to use Name-based Virtual Hosts , we have a server
server.domain1.com which has 2 alias (CNAME) www.domain1.com and
www.domain2.com.
        I read the doc "Virtual Host examples for common setups " and try to
apply to my situation one IP address and 2 names.
------------------------
http.conf:
-----------
ServerName server.domain1.com

NameVirtualHost 1.2.3.4

<VirtualHost 1.2.3.4>
DocumentRoot /apache/www
ServerName www.domain1.com
</VirtualHost>

<VirtualHost 1.2.3.4>
DocumentRoot /apache/www/domain2
ServerName www.domain2.com
</VirtualHost>
-------------------------
I put nothing about virtual host in the srm.conf.

When i start apache, i have:
--------------
./apachectl start
VirtualHost configuration:
1.2.3.4:80      is a NameVirtualHost
                       default server www.domain1.com
 (/usr/local/apache_1.3.1/etc/httpd.conf:245)
                       port 80 namevhost www.domain1.com
(/usr/local/apache_1.3.1/etc/httpd.conf:245)
                       port 80 namevhost www.domain2.com
(/usr/local/apache_1.3.1/etc/httpd.conf:250)
./apachectl start: httpd started
------------------
So the namevirtualhost seems to work, everything is fine with the
domain1 but the domain2 has problems with the first page.

When i try with netscape 4 the url www.domain2.fr, i got the index.html
of the domain1 but not the images, because the images are search in the
documentroot of domain2.

When i try www.domain2.fr/index.html. everything is fine.

When i try with a client running on server.domain1.com everything is
fine.

????? any idea...

 
 
 

Problems whith virtual host

Post by Arnaud Moular » Wed, 30 Sep 1998 04:00:00


I replace the file index.html in domain2 and everything is OK now.

        The problem was not caused by apache... sorry

 
 
 

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. Megahertz pcmcia driver

3. FrontPage virtual hosting, removal or reset of virtual host

4. how to get good expertise on linux

5. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

6. Login Attempts/Failures

7. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

8. Hylafax Problems

9. For Discussion: web virtual hosting vs mail virtual hosting

10. Virtual hosts/virtual IP

11. Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

12. Virtual interface/Virtual web hosting

13. Virtual Server vs. Virtual Host