|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
DocumentIndex directive
Why does this work:
Code:
DirectoryIndex index.html ...and this doesn't? Code:
DirectoryIndex index.jsp # this doesn't either: DirectoryIndex index.jsp index.html I'm using Apache 1.3.20 and Tomcat 3.3. Strangely http://localhost/index.jsp works but http://localhost/ . Last edited by filburt1 : December 16th, 2001 at 08:25 PM. |
|
#2
|
|||
|
|||
|
Only I can think of is... Did you restart your Apache when you configured the httpd.conf?
That's all I know, since I don't see any of problem with your configure. |
|
#3
|
|||
|
|||
|
I did, let me try restarting Tomcat as well to see if that makes a difference...
|
|
#4
|
|||
|
|||
|
No change. BTW, I meant DirectoryIndex, not DocumentIndex.
![]() |
|
#5
|
||||
|
||||
|
do .jsp pages work OK on your server otherwise?
|
|
#6
|
|||
|
|||
|
Yes.
|
|
#7
|
||||
|
||||
|
Are you applying this server wide or in a virtual host?
I feel like this is a stretch here, but is this DirectoryIndex defined above or below where you added the directives to load Tomcat? If it's above where .jsp pages are assigned to Tomcat, you may want to move it below- httpd.conf is parsed from the top down, I believe. Do you get an error message? How is it not working? What's in your server error logs? |
|
#8
|
|||
|
|||
|
It's loaded server-wide, mainly because I don't know how to do virtual hosts.
It is defined above the Tomcat definition (all you have to do is Include conf/tomcat.conf). I don't get an error message, it just never serves any page and times out. Strangely enough there is nothing in the error.log file. Let me try rearranging the Tomcat inclusion and the DirectoryIndex directive. |
|
#9
|
|||
|
|||
|
Quote:
No change: Code:
Include conf/tomcat.conf
#
# 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.jsp index.html
</IfModule>
Let me try an experiment here... |
|
#10
|
|||
|
|||
|
Commenting the <IfModule> lines made no difference.
|
|
#11
|
|||
|
|||
|
Just guessing here:
Apache is running? You do get other pages? Your index.jsp works? Try a plain html-page and rename it index.jsp. If you get a time out and you don't have an entry in your access_log, it looks like the request for the page is passed to tomcat and tomcat fails to do whatever it should do. I don't know much about tomcat but i guess you'd have to do something like AddType application/x-httpd-php .php (only for jsp of course) in your httpd.conf |
|
#12
|
|||
|
|||
|
Apache is running.
I get other pages. Index.jsp works. Trying the rename... About the timeout, why would a page be served then if I ask it for http://localhost/apacheroot/index.jsp? Trying the AddType... |
|
#13
|
|||
|
|||
|
I copied the index.html to index.jsp and tried it, now it gives me IE's cheery This page could not be displayed because it couldn't find a server, even though both Apache and Tomcat are running.
|
|
#14
|
|||
|
|||
|
tomcat.conf, which at the end of my httpd.conf is included, already has this: AddType text/jsp .jsp.
|
|
#15
|
|||
|
|||
|
I think I found the problem, I mistyped the IP address for the server in the httpd.conf file. I was off by one digit, it was amazing it would work at all.
![]() Thanks for your help guys. ![]() |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > DocumentIndex directive |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|