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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error log says: File does not exist: /usr/local/www/test/htdocs/

Status
Not open for further replies.

mikeageend

Programmer
Sep 30, 2001
2
US
I am new toApache so I purgased the O'rRelliy book "Apache The Definitive Guide". I am referencing material from Chapter 2.

I am running Apache 1.3.19

Here is my http.conf file
User nobody
Group nobody
ServerName localhost
DocumentRoot /usr/local/
I have an index.html in the htdocs directory

The book seems to imply that I can point my browser to
and it will display this index.html file, but all I get is this error message. I don't get the message if I point the browser to but this is not how the book says to do it and it does not render the html, but prints the html source.

I start the server as httpd -d /usr/local/
Any help would be appreciated.

Thanks
 
Add the following to the bottom of your httpd.conf file...


/* Start Code Snippet
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory &quot;/usr/local/ # Web root
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
<Files ~ &quot;^\.ht&quot;>
Order allow,deny
Deny from all
</Files>
# the Files section ensures that users are unable to view
# the Security Info of .htaccess
</Directory>
End Code Snippet*/
 
I tried as you specified and the server complained about the Order and Allow keywords. I commented them out and the server started but with the same results as before.

I then tried an experiment. Instead of invoking httpd -d blah-blah, I used apachectl instead and changed the location of DocumentRoot in the default http.conf file I got when I did the initial install of the apache software. I placed an index.html in the DocumentRoot directory and pointed the browser to localhost and everything worked. I realize there are a number of settings in the http.conf I got with the initial, default apache setup so I don't know what settings caused this approach to work. The OReilly book seemed to suggest (realize I haven't read all of it yet) that the way to create different web sites and have the server point to them is with the httpd -d command. This does not appear to work as the book suggests. I am confused about the use of apachectl vs httpd.

Anyway, thanks for your quick response, it is appreciated.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top