| Article: |
Apache Web-Serving with Mac OS X: Part 2 | |
| Subject: | how to enable .html | |
| Date: | 2002-02-05 12:35:04 | |
| From: | storme | |
|
I have headers and footers on all of my pages so I want to enable .html but it doesn't seem to work....
|
||
Showing messages 1 through 7 of 7.
-
how to enable .html
2002-02-05 13:19:10 Morbus Iff |
[View]
-
how to enable .html
2002-02-05 14:08:01 storme [View]
Didn't work....is it possible that the problem is that Apache is passing these pages onto tomcat? I should also note that since I am not using CGI I did NOT follow the CGI steps earlier. Here are what I *think* the important config lines that I've modified:
RewriteEngine on
RewriteRule ^/(.*)$ /PCW/$1 [R]
ServerName localhost
DocumentRoot "/usr/local/jakarta-tomcat-4.0.1/webapps/PCW/"
<Directory />
Options Includes FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/local/jakarta-tomcat-4.0.1/webapps/PCW/">
Options Includes Indexes FollowSymLinks MultiViews
*** This is unchanged:
<Directory "/Library/WebServer/CGI-Executables">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
*** These are the Tomcat config lines:
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
WebAppConnection PCWConn warp localhost:8008
WebAppDeploy PCW PCWConn /PCW/
*** my users config files include the following:
<Directory "/Users/storme/Sites/">
Options Includes Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/usr/local/jakarta-tomcat-4.0.1/webapps/PCW/">
Options Includes Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "/Users/webserve/Sites/">
Options Includes Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
-
how to enable .html
2002-02-06 07:49:36 Morbus Iff |
[View]
I've not used Tomcat before, so I can't shed any insight on whether Tomcat is doing any of the processing.
Where is this "index.html" page that you want to load? I ask because in your first message, you mention that you set the DocumentRoot to /webapps/, so I was assuming you had an index.html in there. But, with the above configuration, anything in /webapps/ is autoredirected to /webapps/PCW/ with these lines:
RewriteEngine on
RewriteRule ^/(.*)$ /PCW/$1 [R]
If that's your intention - is there a /webapps/PCW/index.html in there? -
how to enable .html
2002-02-06 08:49:23 storme [View]
Yes. Everything works until I enable the lines:
AddType text/html .html
AddHandler server-parsed .html
which produces the error I mentioned above. Tomcat is supposed to serve any page with a .jsp suffix and Apache anything with .html so I wouldn't think that Tomcat has anything to do with it in this case but thought I should mention it. Note that since I'm not using CGIs (I think!) I didn't follow the CGI steps earlier in the article - a problem do you think? -
how to enable .html
2002-02-06 13:13:40 Morbus Iff |
[View]
No, not following the CGI instructions would have nothing to do with it. Instead of doing the two lines you just gave me, why not just modify your existing AddHandler line to include .html? So, instead of the above, search for your:
AddHandler server-parsed .shtml
And change to:
AddHandler server-parsed .shtml .html
-
how to enable .html
2002-02-06 21:31:57 storme [View]
tried both - does the include change any paths ? Really very odd. -
how to enable .html
2002-02-05 14:09:28 storme [View]
forgot one:
AddType text/html .shtml
AddHandler server-parsed .shtml .html
I've also tried just this:
AddType text/html .html
AddHandler server-parsed .html



AddHandler server-parsed .shtml
And make it:
AddHandler server-parsed .shtml .html
Then restart the server, and you should be set.