httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: Problem of rewrite
Date Mon, 05 Aug 2002 12:52:35 GMT
There are a couple of problems here..

(1) It is not the <VirtualHost> container which defines the server name to be used to
separate your VHs - it is the ServerName directive. You  need to add these where marked ">>>"
below.

(2) Are you sure that domain.com and www.domain.com both resolve to the machine's IP address?
You need this in order to use FQDNs in <VirtualHost>. In fact, it is better to use plain
IP addresses here (see below).

Is your machine connected to the internet?

Another point - both your VHs have the same DocumentRoot.. So they will serve the same content.
Is that what you want? If so, you can use:

>>>	<VirtualHost 192.168.200.1>
>>> 	  ServerName domain.com
>>>	  ServerAlias www.domain.com

and you only need one VH.


Rgds,

Owen Boyle

>-----Original Message-----
>From: EdwardSPL@ita.org.mo [mailto:EdwardSPL@ita.org.mo]
>Sent: Montag, 5. August 2002 12:09
>To: users@httpd.apache.org
>Subject: Problem of rewrite
>
>
>I can't connect to http://domain.com ( of course http://www.domain.com
>alos fail ) according this setting of httpd.cof :
>
>NameVirtualHost 192.168.200.1
>
><VirtualHost domain.com>

>>>	<VirtualHost 192.168.200.1>
>>> 	  ServerName domain.com

>DocumentRoot "/home/domain/html"
>ServerAdmin root@domain.com
>RewriteEngine on
>RewriteRule ^/$ http://www.domain.com
><Directory "/home/domain/html">
> Options Indexes Includes FollowSymLinks MultiViews ExecCGI
> AllowOverride All
> Order allow,deny
> Allow from all
></Directory>
>ErrorLog /var/log/httpd/error.log
>CustomLog /var/log/httpd/access.log common
></VirtualHost>
>
><VirtualHost www.domain.com>

>>>	<VirtualHost 192.168.200.1>
>>> 	  ServerName www.domain.com

>DocumentRoot "/home/domain/html"
>ServerAdmin root@domain.com
><Directory "/home/domain/html">
> Options Indexes Includes FollowSymLinks MultiViews ExecCGI
> AllowOverride All
> Order allow,deny
> Allow from all
></Directory>
>ErrorLog /var/log/httpd/error.log
>CustomLog /var/log/httpd/access.log common
></VirtualHost>
>
>So, can you help me more ?
>
>Thanks,
>
>Edward.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message