[opencms-dev] Login problem with mod_proxy
Pere Torrodellas
ptorrodellas at fihoca.com
Thu Apr 6 15:07:20 CEST 2006
Hello,
After carefully reading the information about integrating OpenCms (6.2.0)
with Apache HTTP server, it somewhat works (I can access all the OpenCms
documentation, the static elements are served by Apache, etc), but I can't
login to administration in the normal way: the login form is displayed OK,
but after entering id and pw, OpenCms returns the same form with empty
fields, and no error is reported in the OpenCms or Tomcat logs.
The login page source in the browser has a <form> with:
action="/opencms/system/login/index.html" method="POST"
but when the login button is clicked, both the Apache and the Tomcat access
logs show the request as:
"GET /system/login/index.html HTTP/1.1" 200 2894
a GET instead of a POST and no parameters, same as the initial one, so
that's why I get the same empty login form. I checked everything and erased
the browser cache, etc, but was unable to find an explanation. How is this
possible?
Other symptoms:
- The search example in the OpenCms documentation is also a POST request,
but it does show as a POST in the logs and works OK.
- If I manually enter the following login URL in the browser field:
http://srvsocbcn/opencms/system/login/index.html?ocUname=Admin&ocPword=admin
&login=true&requestedResource=%2Fsystem%2Fworkplace%2Fviews%2Fworkplace.jsp
the login succeeds, the Explorer workplace window is displayed OK, and I can
navigate the folders tree, so the Apache, Tomcat and OpenCms changes to
implement the proxy function can't be that wrong.
Later I run into other problems, though:
- Selecting the Administration view reverts to the Explorer view.
- Opening a page for editing shows the contents OK, but an error is returned
when closing the editor.
but this is maybe not related to the login problem.
Can this be a spacific V6.2.0 issue? Can anyone suggest an explanation?
Thanks,
Pere
PS: For the sake of completeness, these are the definitions:
OpenCms server.xml:
<sites>
<workplace-server>http://srvsocbcn</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server="http://srvsocbcn" uri="/sites/default/"/>
</sites>
OpenCms import-export.xml:
<rendersettings>
<rfs-prefix>/export</rfs-prefix>
<vfs-prefix>${SERVLET_NAME}</vfs-prefix>
<userelativelinks>false</userelativelinks>
<exporturl>http://127.0.0.1:8080/handle404</exporturl>
.............
Tomcat server.xml:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener ....../>
<Listener ......./>
<GlobalNamingResources>
.................
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" ..... />
<Connector port="8443" ...... />
<Connector port="8009" ...... />
<!-- Added for OpenCms Apache proxy -->
<Connector port="8082"
className="org.apache.coyote.tomcat5.CoyoteConnector"
minProcessors="5" maxProcessors="75" proxyName="srvsocbcn"
proxyPort="80" useBodyEncodingForURI="true"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0"
connectionTimeout="20000" useURIValidationHack="false"
disableUploadTimeout="true" />
<Engine name="Catalina" defaultHost="localhost" debug="0">
<Logger ..../>
<Realm ..../>
<Host ....>
<Valve ..../>
<Logger ..../>
</Host>
</Engine>
</Service>
</Server>
Apache httpd.conf:
......................
<VirtualHost *:80>
<Directory "C:/tomcat-5/webapps/ROOT/">
Order allow,deny
Allow from all
</Directory>
ServerName srvsocbcn
ServerAdmin ptorrodellas at fihoca.com
DocumentRoot "C:/tomcat-5/webapps/ROOT/"
ErrorLog logs/error.log
# Log only non-redirect requests in "normal" log file
SetEnvIf Request_URI "\/opencms\/*" redirect
CustomLog logs/localhost-access.log common env=!redirect
ProxyPass /opencms/ !
RedirectPermanent /opencms/ http://srvsocbcn/
ProxyPass /resources/ !
ProxyPass /export/ !
ProxyPass /
http://localhost:8082/opencms/
ProxyPassReverse /
http://localhost:8082/opencms/
</VirtualHost>
More information about the opencms-dev
mailing list