[xwiki-users] WYSIWYG Editor Not Working with Nginx https reverse proxy
I configured HTTPS for my XWiki installation using Nginx today and everything seems to work except the WYSIWYG editor. When trying to edit a page over HTTPS the editor never loads and I just get the spinner, but editing with the source editor works without issue. If I stop try to edit the same page over HTTP everything works correctly. I followed the instructions here: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat#HNgin... I'm running XWiki 8.1. Any suggestions? Thanks, Jared -- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Jared, Your issue might be related to http://jira.xwiki.org/browse/XWIKI-5771 . Note that the WYSIWYG editor you have in 8.1 is not maintained anymore and has been replaced with CKEditor in 8.2. The good part is that you can install CKEditor on 8.1. See http://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration . Would be good to know if CKEditor has issues behind a reverse proxy. Thanks, Marius On Tue, Jul 26, 2016 at 11:45 PM, simmsj <simmsj@mac.com> wrote:
I configured HTTPS for my XWiki installation using Nginx today and everything seems to work except the WYSIWYG editor. When trying to edit a page over HTTPS the editor never loads and I just get the spinner, but editing with the source editor works without issue. If I stop try to edit the same page over HTTP everything works correctly.
I followed the instructions here:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat#HNgin...
I'm running XWiki 8.1.
Any suggestions?
Thanks, Jared
-- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
I installed the CKEditor on my 8.1 installation and it worked the first time I tried to edit a page, but after that I get the same spinning sprocket that I do with the default 8.1 WYSIWYG editor over HTTPS using the Nginx reverse proxy. All editors work when going directly to Tomcat over HTTP. They also work using Nginx to proxy just HTTP traffic instead of HTTPS. I also tried setting xwiki.url.protocol=https in xwiki.cfg based on one of the comments from Sergiu Dumitriu in XWIKI-5771 but that didn't help either. Based on the Tomcat installation instructions, I made the following changes to my \etc\tomcat\server.xml: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" URIEncoding="UTF-8" redirectPort="8443" secure="true" # Added value scheme="https" /> # Added value <Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="x-forwarded-for" protocolHeader="x-forwarded-proto" /> Any other thoughts? Thanks, Jared -- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello Jared, I had the same problem. It was due to my nginx SSL conf (sites-enables config), i removed the red part. Works fine for me after this update with Safari, Chrome or Firefox. I give you an extract of my config. Hope this help :-) Regards, Pascal nginx@reverse:~# vi /etc/nginx/sites-enabled/yoursite.com server { listen 443; server_name yoursite.com; ssl_certificate /etc/nginx/certificats/Yoursite.crt; ssl_certificate_key /etc/nginx/certificats/Yoursite.key; ssl_dhparam /etc/nginx/certificats/dhparam.pem; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_protocols TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL; ssl_stapling on; ssl_stapling_verify on; #Remove for xwiki###add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; #Remove for xwiki###add_header X-Frame-Options DENY; #Remove for xwiki###add_header X-Content-Type-Options nosniff; charset utf-8; location ~* ^/xwiki/bin/skin/(.*)\.(jpg|jpeg|gif|png|ico)$ { access_log off; rewrite ^/xwiki/bin/skin/(.*) /xwiki/$1 permanent; expires max; } ssl on; access_log /var/log/nginx/access.log; location ^~ /xwiki { # If path starts with /xwiki - then redirect to backend: XWiki application in Tomcat proxy_pass http://10.0.1.XX:8080/xwiki; }
Le 27 juil. 2016 à 16:56, simmsj <simmsj@mac.com> a écrit :
I installed the CKEditor on my 8.1 installation and it worked the first time I tried to edit a page, but after that I get the same spinning sprocket that I do with the default 8.1 WYSIWYG editor over HTTPS using the Nginx reverse proxy. All editors work when going directly to Tomcat over HTTP. They also work using Nginx to proxy just HTTP traffic instead of HTTPS.
I also tried setting xwiki.url.protocol=https in xwiki.cfg based on one of the comments from Sergiu Dumitriu in XWIKI-5771 but that didn't help either.
Based on the Tomcat installation instructions, I made the following changes to my \etc\tomcat\server.xml:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" URIEncoding="UTF-8" redirectPort="8443" secure="true" # Added value scheme="https" /> # Added value
<Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="x-forwarded-for" protocolHeader="x-forwarded-proto" />
Any other thoughts?
Thanks, Jared
-- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Pascal, That did the trick. All the editors now work over HTTPS in all the browsers I tested with. Thanks for your help. - Jared -- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Jared,
On 27 Jul 2016, at 17:51, simmsj <simmsj@mac.com> wrote:
Pascal,
That did the trick. All the editors now work over HTTPS in all the browsers I tested with.
Thanks for your help.
Cool. Do you think you could verify if this page has the information required http://platform.xwiki.org/xwiki/bin/view/AdminGuide/NginX ? And if not, add it? That would be a nice contribution :) Thanks a lot -Vincent
- Jared
-- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com.
Fine :) Note : Be aware that removing these 3 lines from nginx will downgrade your WebSite SSL Security from A+ to A :-) (https://www.ssllabs.com/ssltest/ <https://www.ssllabs.com/ssltest/>) Best regards, Pascal
Le 27 juil. 2016 à 17:51, simmsj <simmsj@mac.com> a écrit :
Pascal,
That did the trick. All the editors now work over HTTPS in all the browsers I tested with.
Thanks for your help.
- Jared
-- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Pascal, Thanks for the heads up. The server is for internal use, but I didn't want authentication being passed over HTTP. I'll take an A in this case. Thank you again for your help. It probably would have taken quite awhile for me to track that down on my own. Vincent, It looks like the page you referenced on using Nginx is for high volume sites. My use case was is having Nginx handle HTTPS traffic and port 80. I can clean up my notes, but my configuration is quite different. - Jared -- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 28 Jul 2016, at 17:35, simmsj <simmsj@mac.com> wrote:
Pascal,
Thanks for the heads up. The server is for internal use, but I didn't want authentication being passed over HTTP. I'll take an A in this case. Thank you again for your help. It probably would have taken quite awhile for me to track that down on my own.
Vincent,
It looks like the page you referenced on using Nginx is for high volume sites. My use case was is having Nginx handle HTTPS traffic and port 80. I can clean up my notes, but my configuration is quite different.
(Back from holidays, catching up on my mails…) This page is for setting up xwiki with ngingx (as the title says on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/NginX). You could add sections in this page to separate different topics though :) Basically the idea is to put all knowledge related to nginx on that page. Thanks! -Vincent
- Jared
-- View this message in context: http://xwiki.475771.n2.nabble.com/WYSIWYG-Editor-Not-Working-with-Nginx-http... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (4)
-
Gmail-ucebex -
Marius Dumitru Florea -
simmsj -
Vincent Massol