Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get DocumentRoot directive to work 2

Status
Not open for further replies.

matias

Technical User
Jun 14, 2000
9
VE
1.- httpd.conf contains the following:<br><br>NameVirtualHost 200.11.216.149<br>&lt;VirtualHost <A HREF=" TARGET="_new"> /usr/local/ productrix.com<br>&lt;/VirtualHost&gt;<br><br>2.- In httpd.conf, the directive:<br>DocumentRoot /usr/local/ commented with #. Thus, the directory <br>/usr/local/ <br>should play no role in this server<br><br>3.- A call to <A HREF=" TARGET="_new"> takes the user to<br>/usr/local/ of<br>/usr/local/
 
Have you restarted Apache after making the changes? <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
Yes. After each test I stop and start. I have verified in the log that it actually restarts
 
Yes. I'm sure. The cache is disabled. Further, I have made several tests and each time I get something different. For example, I added a _default_ and it took me to the default directory. Seems the system does not interpret correctly the name of the site. No idea why
 
What browser are you using? I guess -I have a very fuzzzy memory- apache needs an HTTP 1.1 req to use efectively virtual domains.
 
THANKS! Now I am closer to the solution of my question!<br><br>This is what I have in the config file. Requests go to the _default_<br><br>NameVirtualHost 200.11.216.149<br>&lt;VirtualHost <A HREF=" TARGET="_new"> /usr/local/ <A HREF=" TARGET="_new"> FollowSymLinks<br>&lt;/VirtualHost&gt;<br>&nbsp;&lt;VirtualHost _default_:*&gt;<br>&nbsp;DocumentRoot /usr/local/ default<br>&nbsp;&lt;/VirtualHost&gt;<br><br><br>These are the lsat two entries in the log file:<br><br>200.44.68.15 - - [15/Jun/2000:22:53:53 -0400] &quot;GET / HTTP/1.0&quot; 200 455 &quot;-&quot; &quot;Mozilla/4.73 [en] (Win98; U)&quot;<br>200.44.68.12 - - [15/Jun/2000:23:03:19 -0400] &quot;GET / HTTP/1.1&quot; 200 455 &quot;-&quot; &quot;Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)&quot;<br><br>I now have TWO questions<br>1.- Why does Netscape 4.73 (last version) report HTTP/1.0? (Also true in Netscape 4.5)<br>2.- Why does Internet Explorer report HTTP/1.1 but does not contain the requested URL?<br><br>Surely, as ElgisRamon discovered, this is why requests to my apache don't go to the right place!<br>
 
Some of the HTTP 1.0 based browser send the necessary information to make NameVirtualHost play. But I can't remember the specific names and versions. I don't have that memory. But I can tell you a URL: <b><A HREF=" TARGET="_new"> I found that in my &quot;Apache: The definitive guide&quot;.<br><br>I hope it works...
 
This discussion has been helpful in many ways. Each suggestion, first of <b>AndyBo</b> and then from <b>ElgisRamon</b>, has forced me to study and thus better understand Apache.<br><br>I have confirmed that the browser sends the referer, since I can see it in the log file. <br>I will study the vhosts document carefully. I am convinced that when apache compares the name in VirtualHost with the name delivered by the browser, it finds a difference.<br>
 
There are some directives in the httpd.conf file that force Apache to use HTTP 1.0 if it is serving a particular browser version.&nbsp;&nbsp;I think this is in response to the &quot;FIN_WAIT_2&quot; problem that's discussed in the documentation, and it may be that Netscape is falling foul of this. <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
I don't think it's FIN_WAIT_2. I checked the documentation in the Apache site. FIN_WAIT_2 depends on the browser. This problem occurs with Internet Explorer 5, Netscape 4.5 and Netscape 4.7.<br>Further, if I understood it right, FIN_WAIT_2 is associated with no connection. I <b>do get a connection</b>. Only, instead of going to the document specified in &lt;VirtualHost <A HREF=" TARGET="_new"> it goes to the document in &lt;VirtualHost _default_:*&gt;<br>
 
Oops - sorry, I wasn't too clear there.<br><br>In the httpd.conf file of recent Apache releases there are some directives that check the browser version.&nbsp;&nbsp;If the browser version matches a certain pattern, then Apache drops down into HTTP 1.0 mode, regardless of what the browser is asking for.<br><br>So, even if Netscape is set to use HTTP 1.1, Apache may be serving it HTTP 1.0 instead.<br><br>If I recall correctly, the &quot;FIN_WAIT_2&quot; problem was mainly related to Netscape browsers.&nbsp;&nbsp;IE3/4/5 didn't seem to have the same problem.<br><br>Also, &quot;FIN_WAIT_2&quot;, in a nutshell, is a result of the browser saying &quot;close the connection&quot;, the server replying &quot;OK&quot; and then waiting for a final confirmation from the browser that it never gets.&nbsp;&nbsp;This results in an httpd process hanging around that isn't needed.&nbsp;&nbsp;If you're running a busy server serving many thousands of pages a day, this can start to add up to lots of wasted CPU cycles.<br><br>So, Apache now has this workaround in place whereby &quot;bad&quot; browsers are forced to use HTTP 1.0 and avoid FIN_WAIT_2 problems.<br><br>So, getting to the point, this might be why you see two different HTTP versions in your log - HTTP 1.0 for Netscape, and HTTP 1.1 for IE5.01.<br><br>Hope that clears it up a little :) <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits
 
<b>This clears up a lot</b> and is very instructive!<br>I couldn't understand why Apache considered the latest Netscaspe version as 1.0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top