LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Apache not configured right (https://www.linuxquestions.org/questions/debian-26/apache-not-configured-right-118814/)

chaskins 11-22-2003 06:46 AM

Apache not configured right
 
Hi,

I've recently installed Debian but my Apache web server doesn't seem to be configured right. When I type
Quote:

mydomain.net
it loads the index.html page, but if I try to look in any sub-directories it doesn't find the index.html file unless I explicitly call it,
Quote:

mydomain.net/subsir/index.html.
Anyone know why?

Also I've tried the same with a php file and this fails to load from sub-dirs. When I try
Quote:

mydomain.net/subdir/index.php
it fails to load and when I looked in the error_log it's say it can't find
Quote:

mydomain.net/index.php
, Note the missing subdir! So in this case it seem to me looking for the index.php file in the root dir not the subdir .... very strange :(

Thanks for any help to resolve this :)

Chris

llamakc 11-22-2003 06:52 AM

1. Is php installed?
2. Have you edited httpd.conf to allow for php to be parsed BEFORE .html? This will be

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm index.shtml index.cgi
</IfModule>

WHERE you stick index.php before index.html

3. What happens if you place a test.txt file in one of the /var/www/subdirs (or whatever your DocumentRoot is) and you explicitly call it?

chaskins 11-22-2003 07:17 AM

Hi Thanks for the reply. :)

Php is installed and 'index.php' appears first in the DirectoryIndex list as you've shown.

Quote:

. What happens if you place a test.txt file in one of the /var/www/subdirs (or whatever your DocumentRoot is) and you explicitly call it?
It displays the cotent of the file.

Thanks

Chris

llamakc 11-22-2003 07:28 AM

Have you restarted apache after you edited DirectoryIndex?

apachectl configtest

apachectl restart

HTH

chaskins 11-22-2003 10:16 AM

Yes I did all that :)

PHP & htmlpages work if you explicitly call them, for an example of whats wrong go to;

81.174.166.225/stats

It comes bak saying The page can't be displayed,
Then go to

http://81.174.166.225/stats/index.html

And the page displays ok! :(

Thanks

Chris

chaskins 11-22-2003 10:42 AM

[edit]

Sorry double post :(


All times are GMT -5. The time now is 09:36 PM.