LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 11-22-2003, 06:46 AM   #1
chaskins
LQ Newbie
 
Registered: Nov 2003
Posts: 23

Rep: Reputation: 15
Question 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
 
Old 11-22-2003, 06:52 AM   #2
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
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?
 
Old 11-22-2003, 07:17 AM   #3
chaskins
LQ Newbie
 
Registered: Nov 2003
Posts: 23

Original Poster
Rep: Reputation: 15
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
 
Old 11-22-2003, 07:28 AM   #4
llamakc
Member
 
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402

Rep: Reputation: 31
Have you restarted apache after you edited DirectoryIndex?

apachectl configtest

apachectl restart

HTH
 
Old 11-22-2003, 10:16 AM   #5
chaskins
LQ Newbie
 
Registered: Nov 2003
Posts: 23

Original Poster
Rep: Reputation: 15
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
 
Old 11-22-2003, 10:42 AM   #6
chaskins
LQ Newbie
 
Registered: Nov 2003
Posts: 23

Original Poster
Rep: Reputation: 15
[edit]

Sorry double post
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot get x configured paul62 *BSD 2 05-10-2005 10:11 AM
Is DNS configured in Apache, "named", or both? veeruk101 Linux - Newbie 5 03-31-2005 12:16 PM
ne0 not configured KptnKrill *BSD 4 01-06-2005 01:39 PM
X is not configured hhegab Fedora 4 05-03-2004 11:31 AM
Apache web server not configured right :( chaskins Linux - Software 2 11-22-2003 11:29 AM


All times are GMT -5. The time now is 01:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration