Thanks for direction, Marius!
The solution for Nginx
location / skins / {
root / var / lib / tomcat7 / webapps / ROOT;
}
location / resources / {
try_files $uri $uri / @fallback;
root / var / lib / tomcat7 / webapps / ROOT;
}
location @fallback {
proxy_pass http: // localhost:8080;
}
try_files checks if content exists (=static), if not (=dynamic) - redirects it
to Tomcat.
This solution works fine with all functions of WYSIWYG editor, BUT after
save/cancel action XWiki logs me out :-)
It happens ONLY after using some WYSIWYG functions e.g. Insert macro. If they
were not used - it works hassless.
If action was save and view - document is saved correctly.
Any ideas how to fix this specific behaviour?
Thanks beforehand.
Четверг, 17 января 2013, 13:30 +02:00 от Marius Dumitru Florea
:
>On Thu, Jan 17, 2013 at 7:49 AM, Haru < haru_mamb...@mail.ru > wrote:
>> Hi, WYSIWYG editor experts!
>>
>> Tomcat 7 + Nginx + brand new XEM 4.3.1 as ROOT application.
>>
>> XWike works fine with short URLs according to manual
>> http://platform.xwiki.org/xwiki/bin/view/Main/ShortURLs .
>> Even WYSIWYG editor works fine until you want to insert macro, image or
>> link. In the Iframe there is an error instead of dialog options.
>>
>> For example, clicking on Macro->Insert Macro gives following:
>>
>> 404 404 Not Found > bgcolor="white"> 404 Not Found
>> nginx/1.1.19
>>
>> Looks like some scripts can not locate something in /skins and /resources,
>> but now I can't even guess where to look at and what to search.
>>
>> Is it a bug and I should jira it OR this is expected behaviour and I miss
>> something in short URLs settings?
>
>I doubt this is caused by the URL shortening (because only the URLs
>that target wiki pages are made shorter). The services used by the
>editor have URLs like this one:
>
< a href="http://xn--
-/xwiki/resources/js/xwiki/wysiwyg/xwe/SomeService.gwtrpc" target="_blank">
http:///xwiki/resources/js/xwiki/wysiwyg/xwe/SomeService.gwtrpc
>
>The last part is important because there is a GWT-RPC servlet mapped
>to *.gwtrpc in web.xml .
>
>> How should it be fixed?
>
>Make sure you don't configure your server (Nginx) to treat these URLs
>(/resources/) as static (at least exclude *.gwtrpc).
>
>Hope this helps,
>Marius
>
>>
>> Config files settings:
>>
>> 1. xwiki.cfg:
>> xwiki.virtual.usepath=0
>> xwiki.showviewaction=0
>> xwiki.defaultservletpath=
>>
>> 2. web.xml. Following was added:
>>
>> action
>> /*
>>
>>
>> 3. nginx:
>>location /skins/ {
>>root /var/lib/tomcat7/webapps/ROOT;
>> }
>>location /resources/ {
>> root /var/lib/tomcat7/webapps/ROOT;
>> }
>>
>>
>> Kind regards,
>>
>> Dmitry
>>
>> P.S. If one wants to see it live, I'll give an access, please write me in
>> private.
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
Kind regards,
Dmitry
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users