apache 2,2 displays It Works not auto displaying index.htm

Hi,

I've installed Apache 2.2 on a new install of FreeBSD 8. I've edited the httpd.conf and set my server name, directory and directory index. This is all local at the moment so http://192.168.75.5 displays "It Works" even though my Directory Index lists index.htm and I have an index.htm in the correct place - if I type http://192.168.7.5.5/index.htm in to the browser I get the correct page displayed.

I'd really appreciate any help.
 
.htm is an artifact of operating systems that could only handle three-character extensions. .html is the correct extension.
 
I've also created an index.html and tried adding it to the DirectoryIndex but the behaviour is still the same.

If I type http://192.168.75.5 into my browser, I get the / added, so the page displayed is http://192.168.75.5/ I get a page that just says "It Works!". I tried adding the DirectoryIndex to the <Direcory /> section in the httpd.conf. I tried creating a .htaccess in the default folder where the index.htm and index.html are located: /usr/local/etc/apache22/data and putting a DirectoryIndex in the .htaccess file .... all to no avail :(

However,
if I type http://192.168.75.5/index.htm I get the correct page displayed;
if I type http://192.168.75.5/index.html I get the correct page displayed.

Relevant sections from httpd.conf
Code:
ServerRoot "/usr/local"

Listen 192.168.75.5:80

ServerName 192.168.75.5:80

DucumentRoot "/usr/local/www/apache22/data"

DirectoryIndex index.htm index.html
 
Is it actually in the container?

Code:
<IfModule dir_module>
        DirectoryIndex index.html index.html.var index.php
</IfModule>

And is the module actually loaded?

Code:
# httpd -M | grep dir_module
 dir_module (shared)
 userdir_module (shared)
Syntax OK
 
Thanks to wblock and DutchDaemon for your time and help..
It actually turned out I had a typo in the httpd.conf, not for DocumentRoot but in the DirectoryIndex, which was in the correct container.
I had
Code:
DirectoryIndex index.htm index.[B]hmtl[/B]
once I changed it to
Code:
DirectoryIndex index.htm index.[B]html[/B]
and restarted Apache it started working :)
 
"It works!"

Thank you for the reply, I already identified the problem, but not to be due, in my case, is caused by domain forwarding, when I try to "mydomin.com.co ipaddress" in the DNS A Record, index.html, it displays the correct page.
I have: FreeBSD 8.2 P4, apache-2.2.21, php5-5.3.8, no index.html with "It works!" into it.
 
Back
Top