httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "H. Carter Harris" <carter-li...@technettn.net>
Subject [users@httpd] A problem with index.html
Date Mon, 02 Dec 2002 15:37:00 GMT
I have been working my way through the O'Reilly book on Apache and I have
run into a bit of a problem.  I can't get a test website to serve up a
default page but it works perfectly if I give it the starting page as part
of the URL.

A little background: The installed version of Apache is 1.3. I am actually
testing this over the internet and using TightVNC to work on the linux box.
I had a spare domain name so I set up my DNS servers for that domain to
point
to the linux box.  I stopped Apache, wrote a simple conf file then started
Apache with the -f and -d parameters.  The httpd.conf file looked like this:

LoadModule config_log_module /usr/lib/apache/mod_log_config.so
User apache
Group apache
ServerName linuxserver
DocumentRoot /usr/www/site.first/htdocs
TransferLog /usr/www/site.first/logs/access.log

I wrote this conf by looking at the way Mandrake configured Apache when it
was installed as part of the OS (8.2) install.  O'Reilly doesn't use DSO
rather it creates a single executable ... Mandrake uses LoadModule to load
them when they are needed.  I brought up several simple pages and was able
to connect to them and display them in my web browser at home by entering
a URL like:

www.testdomain.com/1.txt, where 1.txt is a document in the
/usr/www/site.first/htdocs directory.  This worked fine.  I then brought up
an example from the book that uses an index.html page placed in the
/usr/www/site.first/htdocs directory.  I changed my conf file to look like
this:

LoadModule config_log_module /usr/lib/apache/mod_log_config.so
LoadModule dir_module /usr/lib/apache/mod_dir.so
User apache
Group apache
ServerName linuxserver
DocumentRoot /usr/www/site.first/htdocs
TransferLog /usr/www/site.first/logs/access.log
DirectoryIndex index.html

If I enter www.testdomain.com in my webbrowser I get a 404 error.  If I
enter www.testdomain.com/index.html it displays my page.

>From reading the Apache documentation, I thought index.html was the default
and it would serve up the page without the directive; but it didn't, with or
without the directive.

BTW, I got the TransferLog directive working the same way ... copying the
LoadModules and directives Mandrake put in the default page (it also worked
over the internet).  Also, from reading the Apache documentation, I thought
I would need a directive like AddModule mod_log_config.c but I got warning
message when starting Apache with that directive in the config file.  I took
it out and logging works just fine without it.  The Mandrake config file has
it.  Did I miss a memo on this?

Thanks in advance for taking the time to read this and any advice you might
have, Carter.




---------------------------------------------------------------------
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