[opencms-dev] error 500 on site root request, help!

Jon Mayes jon.mayes at pegasus-homes.co.uk
Wed Jul 12 12:07:42 CEST 2006


Dear list,

 

I have a sporadic problem which I can't track down!! Our OpenCms site
works fine, apart from when you access the site root with no page
specified, which results in an error 500.

 

For example, I access http://site-name/index.html fine, but if I do
http://site-name <http://site-name/>  or http://site-name/ I get an
OpenCms error 500 box. What's confusing is that the index page name
(title attribute) is still shown in the title bar even though an error
page is shown, plus if you access http://site-name/index.html first and
THEN access http://site-name <http://site-name/>  the problem goes
away..

 

Every time I try to access the site root these 3 lines appear in the
apache access.log:

 

10.0.200.20 - - [12/Jul/2006:10:52:43 +0100] "GET / HTTP/1.1" 200 1282

10.0.200.20 - - [12/Jul/2006:10:52:43 +0100] "GET
/export/system/handler/template/style.css HTTP/1.1" 304 -

10.0.200.20 - - [12/Jul/2006:10:52:43 +0100] "GET
/export/system/handler/template/warning.png HTTP/1.1" 304 -

 

It doesn't seem right to me that the page code is 200...

 

My OpenCms configuration uses Sebastian Himberger's multisite setup, and
we have the OCEE extensions installed. There are two sites running on
the server - an intranet & an extranet. I was thinking I could add a
rewrite rule to append /index.html to blank requests, but it didn't seem
to like that either :/

 

Here are the lines from apache httpd.conf:

 

<VirtualHost *:80>

ServerAdmin xxxxxxxxxxxxxxx

ServerName pegasus-web

ErrorLog logs/site_error.log

#CustomLog logs/site_custom.log

 

# If the requested URI is located in the resources folder, do not
forward the request

SetEnvIfNoCase Request_URI ^/opencms/resources/.*$ no-jk

 

# If the requested URI is static content do not forward the request

SetEnvIfNoCase Request_URI ^/export/.*$ no-jk

 

RewriteEngine on

 

# If the requested URI is NOT located in the resources folder.

# Prepend an /${WEBAPP_NAME}/opencms to everything that does not already
starts with it

# and force the result to be handled by the next URI-handler ([PT])
(JkMount in this case)

 

RewriteCond %{REQUEST_URI} !^/opencms/resources/.*$

RewriteCond %{REQUEST_URI} !^/export/.*

RewriteRule !^/opencms/opencms/(.*)$ /opencms/opencms%{REQUEST_URI} [PT]

 

# These are the settings for static export. If the requested resource is
not already

# statically exported create a new request to the opencms404 handler.
This has to be

# a new request, because the current would net get through mod_jk
because of the "no-jk" var.

 

RewriteCond %{REQUEST_URI} ^/export/.*$

RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f

RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f

RewriteRule .*
/opencms/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]

 

# If the request starts with /${WEBAPP_NAME}/resources, delete the
/${WEBAPP_NAME} prefix

RewriteCond %{REQUEST_URI} ^/opencms/resources/.*$

RewriteRule ^/opencms/(.*)$ /$1

 

DocumentRoot "D:/Tomcat/webapps/opencms/"

JkMount /* ocms

 

</VirtualHost>

 

Any help greatly appreciated,

 

Jon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060712/9f5a837f/attachment.htm>


More information about the opencms-dev mailing list