[opencms-dev] removing opencms/ from the URL
Dudu Zoltan
dzoltan at gmail.com
Fri Jun 13 11:46:19 CEST 2014
Hello,
I eventually made it work using ajp connector
this is the configuration:
opencms-importexport.xml:
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
<vfs-prefix>/</vfs-prefix>
opencms-system.xml:
<sites>
<workplace-server>http://www.example.com</workplace-server>
<default-uri>/</default-uri>
<shared-folder>/shared/</shared-folder>
<site server="http://www.example.com" uri="/sites/default/"/>
</sites>
virtual host for apache:
<VirtualHost *:80>
ServerName www.example.com
ServerAdmin webmaster at localhost
DocumentRoot /var/lib/tomcat7/webapps/ROOT/
<Directory "/var/lib/tomcat7/webapps/ROOT/">
Options FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteRule ^/$ /opencms/ [passthrough]
RewriteCond %{REQUEST_URI} !^/opencms/.*$
RewriteCond %{REQUEST_URI} !^/export/.*$
RewriteCond %{REQUEST_URI} !^/resources/.*$
RewriteCond %{REQUEST_URI} !^/error/.*$
RewriteCond %{REQUEST_URI} !^/icons/.*$
RewriteCond %{REQUEST_URI} !^/update/.*$
RewriteRule .* /opencms%{REQUEST_URI} [QSA,passthrough]
</VirtualHost>
configuration for apache:
<IfModule mod_jk.c>
JkWorkerProperty worker.list=ocms
JkWorkerProperty worker.ocms.type=ajp13
JkWorkerProperty worker.ocms.host=www.example.com
JkWorkerProperty worker.ocms.port=8009
JkLogFile "/var/log/apache2/mod_jk_%Y_%m_%d.log"
JkLogLevel error
JkShmFile /var/log/apache2/jk.shm
JkOptions +RejectUnsafeURI
JkMount /opencms/* ocms
JkMount /export/* ocms
JkMount /resources/* ocms
JkMountCopy All
</IfModule>
and the connector for tomcat's server.xml:
<Connector port="8009"
address="127.0.0.1"
protocol="AJP/1.3"
redirectPort="8443"
emptySessionPath="true"
enableLookups="false"/>
thanks a lot for the help everyone!
On Wed, Jun 11, 2014 at 10:02 PM, Deiverson Silveira <
deiverson at solutioncms.com> wrote:
> Try add this for redirect:
>
> ProxyPass /opencms/resources/commons http://localhost:8080/opencms/resources/commons
> ProxyPassReverse /opencms/resources/commons http://localhost:8080/opencms/resources/commons
>
> ProxyPass /opencms/export/ http://localhost:8080/opencms/export/
> ProxyPassReverse /opencms/export/ http://localhost:8080/opencms/export
>
> ProxyPass /opencms http://localhost:8080/opencms/
> ProxyPassReverse /opencms http://localhost:8080/opencms
>
> ProxyPass / http://localhost:8080/opencms/opencms/
> ProxyPassReverse / http://localhost:8080/opencms/opencms
>
>
>
> 2014-06-11 15:47 GMT-03:00 Dudu Zoltan <dzoltan at gmail.com>:
>
> thanks for everyone for the help,
>> my configuration is the default one regarding apache, tomcat and openCMS
>> (plus the changes as written in the wiki)
>>
>> with Deiverson's method I can reach www.mysite.com (no 404) but all
>> images and CSS are not loaded.
>>
>>
>> On Wed, Jun 11, 2014 at 4:15 PM, Christoph Kukulies <
>> kuku at physik.rwth-aachen.de> wrote:
>>
>>> opencms-importexport.xml should have the lines changed to:
>>>
>>> <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
>>> <vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
>>>
>>> Also examine the error logs
>>>
>>>
>>> --
>>> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>>>
>>>
>>> Am 11.06.2014 07:29, schrieb Dudu Zoltan:
>>>
>>> Hello,
>>> I installed OpenCMS 9.0.1 and the demo site + login worked OK.
>>>
>>> I followed the instructions in
>>> http://www.opencms-wiki.org/wiki/Avoiding_/opencms/opencms_in_the_URL_(apache_%2B_mod_proxy)
>>> <http://www.opencms-wiki.org/wiki/Avoiding_/opencms/opencms_in_the_URL_%28apache_%2B_mod_proxy%29>
>>> to remove the opencms/ part in the URL but after the changes I receive the
>>> OpenCMS 404 page when trying to open www.example.com or
>>> www.example.com/system/login.
>>>
>>> My environment is Ubuntu linux 14.04, apache, Tomcat
>>> OpenCMS is installed as ROOT webapp
>>> (I also tried different combinations for the apache rewrite and proxy
>>> configuration wihtout success)
>>>
>>> Please help me understand what I am missing.
>>> Thank you very much.
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> 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
>>
>>
>>
>>
>>
>
>
> --
> *www.solutioncms.com <http://www.solutioncms.com> The Brazilian Official
> Provider OpenCms *
>
> _______________________________________________
> 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
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140613/d5873b54/attachment.htm>
More information about the opencms-dev
mailing list