Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
Thank you Daniel for sharing this, we will include it in the docs On 6 February 2014 11:13, Daniel Dehennin daniel.dehen...@baby-gnu.orgwrote: Daniel Molina dmol...@opennebula.org writes: On 4 February 2014 17:58, ML mail mlnos...@yahoo.com wrote: I have found out the problem with the 403 forbidden errors, I needed to pass the following HTTP headers in my nginx reverse proxy configuration: proxy_set_headerX-Real-IP $remote_addr; proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_headerHost $http_host; Great, could you share with the list how did you configure nginx and sunstone, and the whole configuration? Personnaly I added a client_max_body_size to upload images: #+begin_src conf # /etc/nginx/sites-available/opennebula-sunstone # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## upstream sunstone { server 127.0.0.1:9869; } server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; server_name nebula.baby-gnu.net; access_log /var/log/nginx/opennebula-sunstone-access.log; error_log /var/log/nginx/opennebula-sunstone-error.log; # To upload ISO files, must be increased for VMs images client_max_body_size 1G; location / { include proxy_params; proxy_pass http://sunstone; } } #+end_src Regards. -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org -- -- Daniel Molina Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
On 4 February 2014 17:58, ML mail mlnos...@yahoo.com wrote: I have found out the problem with the 403 forbidden errors, I needed to pass the following HTTP headers in my nginx reverse proxy configuration: proxy_set_headerX-Real-IP $remote_addr; proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_headerHost $http_host; Great, could you share with the list how did you configure nginx and sunstone, and the whole configuration? Thank you -- -- Daniel Molina Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
Hi Daniel, I already posted my nginx server configuration in this thread. That's all it needs, I did not change any configuration parameters on the sunstone side. Regards ML On Thursday, February 6, 2014 10:52 AM, Daniel Molina dmol...@opennebula.org wrote: On 4 February 2014 17:58, ML mail mlnos...@yahoo.com wrote: I have found out the problem with the 403 forbidden errors, I needed to pass the following HTTP headers in my nginx reverse proxy configuration: 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; Great, could you share with the list how did you configure nginx and sunstone, and the whole configuration? Thank you -- -- Daniel Molina Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
Daniel Molina dmol...@opennebula.org writes: On 4 February 2014 17:58, ML mail mlnos...@yahoo.com wrote: I have found out the problem with the 403 forbidden errors, I needed to pass the following HTTP headers in my nginx reverse proxy configuration: proxy_set_headerX-Real-IP $remote_addr; proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_headerHost $http_host; Great, could you share with the list how did you configure nginx and sunstone, and the whole configuration? Personnaly I added a “client_max_body_size” to upload images: #+begin_src conf # /etc/nginx/sites-available/opennebula-sunstone # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## upstream sunstone { server 127.0.0.1:9869; } server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; server_name nebula.baby-gnu.net; access_log /var/log/nginx/opennebula-sunstone-access.log; error_log /var/log/nginx/opennebula-sunstone-error.log; # To upload ISO files, must be increased for VMs images client_max_body_size 1G; location / { include proxy_params; proxy_pass http://sunstone; } } #+end_src Regards. -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF pgpFrkVOyyCUo.pgp Description: PGP signature ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
Hi, On 2 February 2014 00:06, ML mail mlnos...@yahoo.com wrote: Hi, I am trying to setup nginx as HTTPS reverse proxy to sunstone as described in the OpenNebula3 book. I can get it to work up to the login screen but once logged I get the following error message from sunstone: It appears there was a server exception. Please check server's log. Could yo check what request is causing this error? If you are using Chrome you can check it in the Network tab of the developer tools, you should look for a request returning a 500 error. Cheers Checking sunstone.log or sunstone.error does not show any error. Anyone knows what could be wrong? Below is my nginx server setup: upstream sunstone { server 127.0.0.1:9869; } server { listen 443; server_name sunstone-frontend; ssl on; ssl_certificate /etc/ssl/certs/sunstone.crt; ssl_certificate_key /etc/ssl/private/sunstone.key; location / { proxy_pass http://sunstone; } } Cheers, ML ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org -- -- Daniel Molina Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
Hi Daniel, Using Firefox and Firebug I can see that actually the requests which have trouble are those using AJAX, so the design/layout of Sunstone loads but no data, everything is empty. The requests do not give a 50x error but a 403 Forbidden. Here is a few example of them taken from the Network tab of Firebug: 3ms GET vm?timeout=false 403 Forbidden sunstone-frontend 9 B 192.168.100.170:443 80ms GET image?timeout=true 403 Forbidden sunstone-frontend 9 B 192.168.100.170:443 41ms GET vnet?timeout=true 403 Forbidden sunstone-frontend 9 B 192.168.100.170:443 Do you have any ideas what could be generating that 403? Cheers, ML On Tuesday, February 4, 2014 12:01 PM, Daniel Molina dmol...@opennebula.org wrote: Hi, On 2 February 2014 00:06, ML mail mlnos...@yahoo.com wrote: Hi, I am trying to setup nginx as HTTPS reverse proxy to sunstone as described in the OpenNebula3 book. I can get it to work up to the login screen but once logged I get the following error message from sunstone: It appears there was a server exception. Please check server's log. Could yo check what request is causing this error? If you are using Chrome you can check it in the Network tab of the developer tools, you should look for a request returning a 500 error. Cheers Checking sunstone.log or sunstone.error does not show any error. Anyone knows what could be wrong? Below is my nginx server setup: upstream sunstone { server 127.0.0.1:9869; } server { listen 443; server_name sunstone-frontend; ssl on; ssl_certificate /etc/ssl/certs/sunstone.crt; ssl_certificate_key /etc/ssl/private/sunstone.key; location / { proxy_pass http://sunstone; } } Cheers, ML ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org -- -- Daniel Molina Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Re: [one-users] Sunstone with nginx as reverse-proxy - server exception
I have found out the problem with the 403 forbidden errors, I needed to pass the following HTTP headers in my nginx reverse proxy configuration: 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; Now everything works fine except for VNC. Any clues if it is possible to run VNC in Sunstone through an nginx HTTPS reverse proxy? Note here that my reverse proxy and Sunstone are on the same (frontend) server. Regards ML On Tuesday, February 4, 2014 12:23 PM, ML mail mlnos...@yahoo.com wrote: Hi Daniel, Using Firefox and Firebug I can see that actually the requests which have trouble are those using AJAX, so the design/layout of Sunstone loads but no data, everything is empty. The requests do not give a 50x error but a 403 Forbidden. Here is a few example of them taken from the Network tab of Firebug: 3ms GET vm?timeout=false 403 Forbidden sunstone-frontend 9 B 192.168.100.170:443 80ms GET image?timeout=true 403 Forbidden sunstone-frontend 9 B 192.168.100.170:443 41ms GET vnet?timeout=true 403 Forbidden sunstone-frontend 9 B 192.168.100.170:443 Do you have any ideas what could be generating that 403? Cheers, ML On Tuesday, February 4, 2014 12:01 PM, Daniel Molina dmol...@opennebula.org wrote: Hi, On 2 February 2014 00:06, ML mail mlnos...@yahoo.com wrote: Hi, I am trying to setup nginx as HTTPS reverse proxy to sunstone as described in the OpenNebula3 book. I can get it to work up to the login screen but once logged I get the following error message from sunstone: It appears there was a server exception. Please check server's log. Could yo check what request is causing this error? If you are using Chrome you can check it in the Network tab of the developer tools, you should look for a request returning a 500 error. Cheers Checking sunstone.log or sunstone.error does not show any error. Anyone knows what could be wrong? Below is my nginx server setup: upstream sunstone { server 127.0.0.1:9869; } server { listen 443; server_name sunstone-frontend; ssl on; ssl_certificate /etc/ssl/certs/sunstone.crt; ssl_certificate_key /etc/ssl/private/sunstone.key; location / { proxy_pass http://sunstone; } } Cheers, ML ___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org -- -- Daniel Molina Project Engineer OpenNebula - Flexible Enterprise Cloud Made Simple www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
[one-users] Sunstone with nginx as reverse-proxy - server exception
Hi, I am trying to setup nginx as HTTPS reverse proxy to sunstone as described in the OpenNebula3 book. I can get it to work up to the login screen but once logged I get the following error message from sunstone: It appears there was a server exception. Please check server's log. Checking sunstone.log or sunstone.error does not show any error. Anyone knows what could be wrong? Below is my nginx server setup: upstream sunstone { server 127.0.0.1:9869; } server { listen 443; server_name sunstone-frontend; ssl on; ssl_certificate /etc/ssl/certs/sunstone.crt; ssl_certificate_key /etc/ssl/private/sunstone.key; location / { proxy_pass http://sunstone; } } Cheers, ML___ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org