[opencms-dev] mod_proxy setup problems
Brad Clemmons Jr
brad.clemmons at gmail.com
Tue Jun 3 19:01:34 CEST 2008
Well, in case anyone is actually interested in the future, it appears I was
correct. The war file was not correctly unpacking everything. I completely
wiped the ROOT dir and redumped the war file out there twice this
time(making this 3 times total). The first time I dumped the file,
completed the initial setup and had the same results as my first go
around(no worky - sites/default structure missing). The second time it
appears to have worked and the entire directory structure was built. I'm
not sure what caused the failures though. I never changed any file
permissions between installs and was always logged in as the same user(root)
during install. Now I just have to figure out the static export stuff (all
the static based images for the toolbar in the sys admin site are all
jumbled up). Minor details.
-brad
2008/6/3 Brad Clemmons Jr <brad.clemmons at gmail.com>:
> This is the last few entries in my httpd access log which seems to confirm
> what I thought about the ROOT.war not unpacking the sites directory
> structure. Anyone have any ideas? I'd rather not have to make 30 lines in
> my httpd.conf for each site that I need to rewrite. This mod_proxy tutorial
> from alkacon is the way I'm trying to do this.
>
> ######################################################################
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:10:07 -0400] "GET /index.jsp HTTP/1.1"
> 404 1006
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:10:07 -0400] "GET /favicon.ico
> HTTP/1.1" 404 1012
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:17:06 -0400] "GET /index.jsp HTTP/1.1"
> 404 1006
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:17:12 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:17:28 -0400] "GET /ROOT/index.jsp
> HTTP/1.1" 404 1021
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:20:02 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:20:23 -0400] "GET /ROOT/index.jsp
> HTTP/1.1" 404 1021
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:46:48 -0400] "GET /sites/default
> HTTP/1.1" 404 1018
> xxx.xxx.xxx.xxx - - [02/Jun/2008:13:49:08 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [02/Jun/2008:14:03:56 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [02/Jun/2008:14:44:28 -0400] "GET /ROOT/sites/default
> HTTP/1.1" 404 1033
> xxx.xxx.xxx.xxx - - [02/Jun/2008:14:44:36 -0400] "GET /sites/default
> HTTP/1.1" 404 1018
> xxx.xxx.xxx.xxx - - [02/Jun/2008:14:44:43 -0400] "GET /sites/default
> HTTP/1.1" 404 1018
> xxx.xxx.xxx.xxx - - [02/Jun/2008:15:22:44 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [02/Jun/2008:15:22:51 -0400] "GET /sites/default
> HTTP/1.1" 404 1018
> xxx.xxx.xxx.xxx - - [02/Jun/2008:15:23:03 -0400] "GET /ROOT/sites/default
> HTTP/1.1" 404 1033
> xxx.xxx.xxx.xxx - - [02/Jun/2008:15:23:09 -0400] "GET /ROOT/sites/default
> HTTP/1.1" 404 1033
> xxx.xxx.xxx.xxx - - [02/Jun/2008:15:36:49 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [02/Jun/2008:15:39:19 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [03/Jun/2008:10:51:34 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [03/Jun/2008:10:59:25 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [03/Jun/2008:10:59:28 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [03/Jun/2008:10:59:56 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [03/Jun/2008:11:00:59 -0400] "GET / HTTP/1.1" 404 979
> xxx.xxx.xxx.xxx - - [03/Jun/2008:11:02:10 -0400] "GET / HTTP/1.1" 404 979
> #############################################################
>
> -brad
>
>
>
>
> 2008/6/2 Brad Clemmons Jr <brad.clemmons at gmail.com>:
>
> Well, here's an interesting tidbit. When I did the original setup (before
>> the mod_proxy stuff and using opencms.war as opposed to ROOT.war) it created
>> the sites/default directories under jsp/online and offline like it's
>> supposed to:
>> drwxr-xr-x tomcat/tomcat 0 2008-05-30 12:28:09
>> usr/local/tomcat/webapps/opencms/WEB-INF/jsp/online/sites/default/
>>
>> But when I wiped it, started over and used the ROOT.war as part of the
>> instructions for "Using mod_proxy" it didn't create this directory
>> structure. The only thing under tomcat_home/webapps/ROOT/WEB_INF/jsp/online
>> is a handler directory. It never created the "sites" directory structure.
>> Could something I could have missed running the web browser based setup
>> cause this failure?
>>
>> -brad
>>
>>
>>
>>
>>
>> On Mon, Jun 2, 2008 at 3:18 PM, Shi Yusen <shiys at langhua.cn> wrote:
>>
>>> If you use Apache 2.2.x, you can try the new ajp in mod_proxy.
>>> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
>>>
>>> Here is a sample config of www.langhua.cn, the logic behind is quite
>>> simple:
>>> If a uri should be proxied, then proxy it. If not, use apache.
>>> If a uri should be prefixed with /opencms/opencms/, then add it.
>>> If a uri should be handled by OpenCms 404 handler, then use it.
>>> ...
>>>
>>> NameVirtualHost *:80
>>>
>>> <VirtualHost *:80>
>>> ServerAdmin shijh at langhua.cn
>>> DocumentRoot /usr/share/tomcat5/webapps/opencms
>>> ServerName www.langhua.cn
>>>
>>> RewriteEngine on
>>>
>>> # The URIs don't need to proxy
>>> RewriteCond %{REQUEST_URI} !^/opencms/resources/.*$
>>> RewriteCond %{REQUEST_URI} !^/export/.*$
>>> RewriteCond %{REQUEST_URI} !^/forum/.*$
>>> RewriteRule !^/opencms/opencms/.*$ /opencms/opencms
>>> %{REQUEST_URI} [PT]
>>>
>>> # Keep OpenCms handle404 function work in the integration
>>> 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} [R]
>>>
>>> # If the request starts with /${WEBAPP_NAME}/resources, delete
>>> the /${WEBAPP_NAME} prefix
>>> RewriteCond %{REQUEST_URI} ^/opencms/resources/.*$
>>> RewriteRule ^/opencms/(.*)$ /$1 [PT]
>>>
>>> ProxyRequests Off
>>> ProxyPreserveHost On
>>> ProxyPass /opencms/opencms balancer://cluster/
>>> stickysession=jsessionid
>>> <Proxy balancer://cluster/>
>>> BalancerMember ajp://127.0.0.1:8009/opencms/opencms
>>> </Proxy>
>>>
>>> # Multiple proxies
>>> ProxyPass /forum balancer://forumcluster/
>>> stickysession=jsessionid
>>> <Proxy balancer://forumcluster/>
>>> BalancerMember ajp://127.0.0.1:8009/forum
>>> </Proxy>
>>>
>>> </VirtualHost>
>>>
>>> You can also add Location and other configs in the VirtualHost.
>>>
>>> Tomcat server.xml config:
>>> <Connector port="8009" emptySessionPath="true" URIEncoding="UTF-8"
>>> enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
>>>
>>> OpenCms opencms-importexport.xml config:
>>> <rfs-prefix>/export</rfs-prefix>
>>> <vfs-prefix></vfs-prefix>
>>>
>>> Regards,
>>>
>>> Shi Yusen/Beijing Langhua Ltd.
>>>
>>>
>>> 在 2008-06-02一的 13:43 -0400,Brad Clemmons Jr写道:
>>> > Hi all,
>>> > I'm having a few problems on a quasi-new install. I already have one
>>> > system running Opencms 5 and I had the current system running
>>> > opencms7.0.4 basically in standalone mode. The problems started when
>>> > I tried to setup for mod_proxy.
>>> >
>>> > I tried setting up via mod_proxy via the instructions for using
>>> > mod_proxy in the 7.0.4 documentation module. I already had a working
>>> > Opencms install so I wasn't real happy about the instructions provided
>>> > under "using mod_proxy" regarding removing /ROOT and making sure there
>>> > were no opencms installs already under webapps. But I digress.
>>> >
>>> > This is what my tomcat_home/webapps looks like after removing the
>>> > original /ROOT and /opencms directories, renaming the original
>>> > opencms.war to ROOT.war and dumping the ROOT.war in there and letting
>>> > tomcat extract it.
>>> > drwxr-xr-x 10 tomcat tomcat 4096 Jun 2 11:31 .
>>> > drwxr-xr-x 11 tomcat tomcat 4096 Jan 28 13:41 ..
>>> > drwxr-xr-x 5 tomcat tomcat 4096 Jan 28 13:38 balancer
>>> > drwxr-xr-x 21 tomcat tomcat 4096 Jan 28 13:38 jsp-examples
>>> > drwxr-xr-x 3 tomcat tomcat 4096 Jun 2 11:31 opencms
>>> > -rw-r--r-- 1 tomcat tomcat 0 Jun 2 11:31 opencms_init.log
>>> > drwxr-xr-x 7 tomcat tomcat 4096 Jun 2 12:20 ROOT
>>> > -rw-r--r-- 1 root root 46442274 Mar 3 16:23 ROOT.war
>>> > drwxr-xr-x 4 tomcat tomcat 4096 Jan 28 13:38 servlets-examples
>>> > drwxr-xr-x 12 tomcat tomcat 4096 Jan 28 13:39 tomcat-docs
>>> > drwxr-xr-x 3 tomcat tomcat 4096 Jan 28 13:38 webdav
>>> >
>>> >
>>> > I followed the instructions for "Using mod_proxy" for Opencms 7.0.4
>>> >
>>> > This is the error after setup successfully completes and it tries to
>>> > load the default page:
>>> > # HTTP Status 404 - /opencms/index.jsp
>>> > # type Status report
>>> > # message /opencms/index.jsp
>>> > # description The requested resource (/opencms/index.jsp) is not
>>> available.
>>> > # Apache Tomcat/5.5.26
>>> >
>>> > Restarting tomcat had no affect.
>>> >
>>> > I continued on through Step 4(Using mod_proxy) anyway and when
>>> > attempting to access the site at http://server.mydomain.com/ I get
>>> > this error:
>>> > # HTTP Status 404 - /opencms/
>>> > # type Status report
>>> > # message /opencms/
>>> > # description The requested resource (/opencms/) is not available.
>>> > # Apache Tomcat/5.5.26
>>> >
>>> > If I try to manually type in the index page which I would figure would
>>> > be servername.mydomain.com/ROOT/index.jsp I get a similar error
>>> > basically not finding the page.
>>> >
>>> > What am I missing here? I made backups of my working install before
>>> > mucking with this mod_proxy stuff so worst comes to worst I can say to
>>> > **** with it and roll back. I'd like to get this working though for a
>>> > number of reasons.
>>> >
>>> > What the server is running on:
>>> > CentOS 5
>>> > Apache2.2
>>> > Tomcat5.5
>>> > Java SDK 6update6
>>> > Opencms7.0.4
>>> >
>>> >
>>> > Thanks,
>>> >
>>> > -Brad
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please
>>> visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>>
>>
>>
>>
>
--
I am the guardian standing at the gates and evil shall not pass, it will not
cast it shadow on me and mine, and I will not fear it.
"Maj.Haywood:There is a war on. How is it you are heading west?
Hawkeye: Well, we face to the north and, real sudden like, turn left." -
Last of the Mohicans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080603/e453b5ae/attachment.htm>
More information about the opencms-dev
mailing list