We're Hiring!

Bad Gateway

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Re: Bad Gateway

Postby manics » Tue Jan 06, 2015 4:25 pm

Hi

Thanks for helping to debug the problem! Based on those messages I think the following should work:
Code: Select all
semanage port -a -t http_port_t -p tcp 4080
setsebool -P httpd_read_user_content 1


It seams, that I have to change the context of the var dir ... Am I right?

I think the var directory is checked so that you can put up a "under maintenance" page whilst you modify/reconfigure the server, so you might be able to figure out a way of changing the context of the file/directory instead of using httpd_read_user_content as suggested.

Either way, if you could try it out and let me know that would be a great help, I'll add it to our docs. Also I've belately found something official from Nginx http://nginx.com/blog/nginx-se-linux-ch ... -rhel-6-6/
User avatar
manics
Team Member
 
Posts: 261
Joined: Mon Oct 08, 2012 11:01 am
Location: Dundee

Re: Bad Gateway

Postby xkunes » Tue Jan 06, 2015 4:46 pm

Than it is working:

I have to do:
Code: Select all
(# yum install setroubleshoot)
# semanage port -a -t http_port_t -p tcp 4080
# setsebool -P httpd_read_user_content 1
# setsebool -P httpd_enable_homedirs 1



After setting the httpd_read_user_content, I was not able to sea images, and there was another error whit suggestion to set the httpd_enable_homedirs.

and after that it is working.
And there is no error in /var/log/nginx/error.log, /var/log/audit/audit.log

I hope that it is the righ solution. Could you confirm that?
Another way could be to chance the context of the var directory (ls -Z, chcon)

Do you have any idea, what is safer way?
xkunes
 
Posts: 19
Joined: Thu Oct 31, 2013 4:35 pm

Re: Bad Gateway

Postby manics » Tue Jan 06, 2015 5:05 pm

I'm afraid I don't know what the best way is. In addition to var/ nginx also requires access to the static files under /home/omero/OMERO.server/lib/python/omeroweb/static

If you don't have anything else running on the server what you've got now is probably a reasonable solution, if you do figure something else out let us know. Note it'd be worth checking everything still works after a reboot.

Once again, thanks for your help with debugging and testing!

Simon
User avatar
manics
Team Member
 
Posts: 261
Joined: Mon Oct 08, 2012 11:01 am
Location: Dundee

Previous

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest