httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richmond Dyes <rd...@monroehosp.org>
Subject Re: [users@httpd] Having problems with apache virtual servers
Date Tue, 22 Mar 2005 13:42:15 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Boyle Owen wrote:
<blockquote
 cite="midFDD5D99066749040AF9098A720E989771F05AA@CIWMEXZSA0E.ex.ordersx.org"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: Richmond Dyes [<a class="moz-txt-link-freetext" href="mailto:rdyes@monroehosp.org">mailto:rdyes@monroehosp.org</a>]
Sent: Dienstag, 22. M&auml;rz 2005 14:10
To: Apache userlist
Subject: [users@httpd] Having problems with apache virtual servers


I have an apache setup that seemed to be fine but when I put in a 
virtual host, now I can only get to the virtual host. I can't 
get to the 
main one. This is how my setup looks.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Your problem is that you are assuming that if apache can't match a name
to a virtual host, it will default to the "main" server. This is
incorrect.

Once you define NameVirtualHost, apache will test the Host header of
incoming requests against all VHs with that IP. If it can't find a match
it will use the first one.

You need to forget about the idea of a "main" server and make both sites
VHs on the IP. Then put you "main" site first in the config so you get
the required behaviour detailed in para 1.

BTW, I assume you typed all this in by hand (hence the "named" typo)...
When posting config, it's better to cut'n'paste - tehn we see what is
*really* there, rather than what you think is there...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

  </pre>
  <blockquote type="cite">
    <pre wrap="">ip address
10.0.0.120
The host file on the server reads
10.0.0.120   mainserver
10.0.0.120   virtualhost

httpd.conf has the following settings

servername is mainserver
documentroot   /www/main/htdocs

namedvirtualhost 10.0.0.120:80

&lt;Virtualhost 10.0.0.120&gt;
servername virtualhost
documentroot /www/virtual/htdocs
other directives
&lt;/virtualhost&gt;

In the host file of the test windows client I have
10.0.0.120   mainserver
10.0.0.120   virtualhost

Before I put in the virtual host it went to mainserver fine.  
Now that I 
added the virtual host, I can't get to the mainserver anymore. Can 
someone shed some light on this?




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP 
Server Project.
See <a class="moz-txt-link-rfc1738" href="http://httpd.apache.org/userslist.html">&lt;URL:http://httpd.apache.org/userslist.html&gt;</a>
for more info.
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-unsubscribe@httpd.apache.org">users-unsubscribe@httpd.apache.org</a>
   "   from the digest: <a class="moz-txt-link-abbreviated" href="mailto:users-digest-unsubscribe@httpd.apache.org">users-digest-unsubscribe@httpd.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-help@httpd.apache.org">users-help@httpd.apache.org</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->Diese E-mail ist eine private und pers&ouml;nliche Kommunikation.
Sie hat
keinen Bezug zur B&ouml;rsen- bzw. Gesch&auml;ftst&auml;tigkeit der SWX Gruppe.
This
e-mail is of a private and personal nature. It is not related to the
exchange or business activities of the SWX Group. Le pr&eacute;sent e-mail est
un message priv&eacute; et personnel, sans rapport avec l'activit&eacute; boursi&egrave;re
du
Groupe SWX.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <a class="moz-txt-link-rfc1738" href="http://httpd.apache.org/userslist.html">&lt;URL:http://httpd.apache.org/userslist.html&gt;</a>
for more info.
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-unsubscribe@httpd.apache.org">users-unsubscribe@httpd.apache.org</a>
   "   from the digest: <a class="moz-txt-link-abbreviated" href="mailto:users-digest-unsubscribe@httpd.apache.org">users-digest-unsubscribe@httpd.apache.org</a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href="mailto:users-help@httpd.apache.org">users-help@httpd.apache.org</a>

  </pre>
</blockquote>
Thanks I will implement the changes.<br>
</body>
</html>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message