[xwiki-users] Xwiki + tomcat + nginx proxy
Hello, I have set up xwiki and tomcat7 on a freebsd 9.1 all work fine. When I set nginx as proxy i can't login in xwiki, I have follow this guide http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat#HNgin... any one can help me
Hi, Christopher! Take in mind, that by default XWiki since 5.x in virtual mode, so, until you tell XWiki its domain, you'd be able to get access via IP address only. Thus fill it in the server_name section. Also be sure, that you set up "client_max_body_size" parameter, by default (as far as I remember) it is 2mb only, that will affect on allowed attachments size, that NGINX will allow to load to XWiki. It does not affect on XWiki's attachment size limit. Something like this works for me (XWiki runs as root application). server { listen 80; # .mydomain.com means, that main server name is mydomain.com and all subdomains server_name .mydomain.com; root / var / lib / tomcat7 / webapps / ROOT / ; ###### To take out www if ($host = 'www.mydomain.com' ) { rewrite ^ / ( .* )$ http: // mydomain.com / $1 permanent; } ###### location / { rewrite ^ $scheme: // $server_name$request_uri? permanent; proxy_pass http: // localhost:8080; proxy_set_header Host $host; proxy_set_header X - Real - IP $remote_addr; proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for; client_max_body_size 1100m; #client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffering off; proxy_max_temp_file_size 2M; } } Воскресенье, 7 июля 2013, 16:28 +02:00 от Christopher BRAVO CERCAS <cbcercas@gmail.com>:
Hello, I have set up xwiki and tomcat7 on a freebsd 9.1 all work fine. When I set nginx as proxy i can't login in xwiki, I have follow this guide http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat#HNgin...
any one can help me _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Kind regards, Dmitry
Thanks for your help Dmitry this work with some adjustment (my xwiki run in webapps/xwiki): server { listen 80; server_name wiki.mydomain.com; access_log /var/log/www/xwiki_access.log; # Root to the XWiki application root /usr/local/apache-tomcat-7.0/webapps/xwiki/; location / { #All "root" requests will have /xwiki appended AND redirected to mydomain.com again rewrite ^ $scheme://$server_name/xwiki$request_uri? permanent; } location ^~ /xwiki { # If path starts with /xwiki - then redirect to backend: XWiki application in Tomcat proxy_pass http://localhost:8080/xwiki; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; client_max_body_size 1100m; #client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffering off; proxy_max_temp_file_size 2M; } } thanks very much Christopher 2013/7/7 Dmitry Bakbardin <haru_mamburu@mail.ru>
Hi, Christopher!
Take in mind, that by default XWiki since 5.x in virtual mode, so, until you tell XWiki its domain, you'd be able to get access via IP address only. Thus fill it in the server_name section. Also be sure, that you set up "client_max_body_size" parameter, by default (as far as I remember) it is 2mb only, that will affect on allowed attachments size, that NGINX will allow to load to XWiki. It does not affect on XWiki's attachment size limit.
Something like this works for me (XWiki runs as root application).
server { listen 80; # .mydomain.com means, that main server name is mydomain.com and all subdomains server_name .mydomain.com; root / var / lib / tomcat7 / webapps / ROOT / ;
###### To take out www if ($host = 'www.mydomain.com' ) { rewrite ^ / ( .* )$ http: // mydomain.com / $1 permanent; } ######
location / { rewrite ^ $scheme: // $server_name$request_uri? permanent; proxy_pass http: // localhost:8080; proxy_set_header Host $host; proxy_set_header X - Real - IP $remote_addr; proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for; client_max_body_size 1100m; #client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffering off; proxy_max_temp_file_size 2M; }
}
Воскресенье, 7 июля 2013, 16:28 +02:00 от Christopher BRAVO CERCAS < cbcercas@gmail.com>:
Hello, I have set up xwiki and tomcat7 on a freebsd 9.1 all work fine. When I set nginx as proxy i can't login in xwiki, I have follow this guide
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationTomcat#HNgin...
any one can help me _______________________________________________ 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
participants (2)
-
Christopher BRAVO CERCAS -
Dmitry Bakbardin