[opencms-dev] Removing opencms/opencms , I am desperate

"] Code Create [ <ocms at code-create.de>" at vm-code-create3.wwwserver.net "] Code Create [ <ocms at code-create.de>" at vm-code-create3.wwwserver.net
Tue Sep 29 08:18:36 CEST 2015


Hi Piblo,

your VirtualHost listens at port 80, but your workplace-server url
points to port 8080 and your tomcat ajp listens at port 8009.
You state, you didn't install OpenCms in ROOT folder, but in your vHost
you give "/var/lib/tomcat7/webapps/ROOT" as your document root.
That won't work.

Please revise your configuration.

To set your web application as default web application see:

http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F

Don't touch context-param for param-name "DefaultWebApplication" in web.xml.

If you don't want to deploy your opencms web application below ROOT, you
have to change your apache VirtualHost rewrite rules and DocumentRoot
and Directory accordingly.
But I didn't test this yet, since I'm always deploying into ROOT for
convenience sake.

As for the AJP, I would advise to use mod_jk instead of mod_proxy.

Kind regards, Bernd

Am 28.09.2015 um 13:54 schrieb piblo:
> Hello,
> This is my scenary, opencms not installed in ROOT folder of Tomcat,
> configured with Apache and proxy_ajp to access using port 80.
> 
> I am desperate because I have been unable to eliminate opencms/opencms
> although there are dozens of articles concerning this, anybody could help
> me?
> 
> This is my configuration now, eliminating all my attemps, thanks in advance.
> 
> *opencms-system.xml*
>  
>    <sites>
>       <workplace-server>http://des-istac-t7:8080</workplace-server>
>       <default-uri>/sites/</default-uri>
>       <shared-folder>/shared/</shared-folder>
>       <site server="http://des-istac-t7:8080" uri="/sites/"/>
>     </sites>
> 
> 
> *opencms-importexport.xml*
> 
>                 <rendersettings>
>                         <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
>                        
> <vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
>                         <userelativelinks>false</userelativelinks>
>                        
> <exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl>
>                  ....
> 
> 
> */etc/apache2/sites-available/istac.conf*
> 
> <VirtualHost *:80>
> 
>   ServerName des-istac-t7
>   ServerAdmin webmaster at des-istac-t7
> 
>   # 1. Use the webapp's home as document root
>   DocumentRoot "/var/lib/tomcat7/webapps/ROOT"
> 
>   # 2. Allow Apache to access the document root directory
>   <Directory "/var/lib/tomcat7/webapps/ROOT/">
>     Options FollowSymlinks
>     AllowOverride All
>     Order allow,deny
>     Allow from all
>     Require all granted
>   </Directory>
> 
>   # 3. Set logging behavior (optional)
>   ErrorLog ${APACHE_LOG_DIR}/errors_des-istac-t7.log
>   CustomLog ${APACHE_LOG_DIR}/access_des-istac-t7.log combined
> 
>   # 4. Enable rewriting
>   RewriteEngine On
>   LogLevel mod_rewrite.c:trace1
> 
>   # 7. Add opencms/ prefix if required
>   RewriteCond %{REQUEST_URI} !^/resources/.*$
>   RewriteCond %{REQUEST_URI} !^/export/.*$
>   RewriteCond %{REQUEST_URI} !^/webdav.*$
>   RewriteRule !^/opencms/(.*)$ /opencms%{REQUEST_URI} [PT]
> 
>   # 8. Rewrite rule to make OpenCms' static export working
>   RewriteCond %{REQUEST_URI} ^/export/.*$
>   RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
>   RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
>   RewriteRule .* /opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING}
> [PT]
> 
>   # 9. Connect to Tomcat using proxy_ajp
>   ProxyPreserveHost On
>   ProxyPass /opencms ajp://localhost:8009/opencms
>   ProxyPass /webdav(.*) ajp://localhost:8009/webdav$1
> </VirtualHost>
> 
> 
> 
> 
> --
> View this message in context: http://opencms.996256.n3.nabble.com/Removing-opencms-opencms-I-am-desperate-tp25811.html
> Sent from the OpenCMS mailing list archive at Nabble.com.
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
> 
> 
> 



More information about the opencms-dev mailing list