Generate Nginx includes for advanced configuration (e.g. SSL)#5381
Generate Nginx includes for advanced configuration (e.g. SSL)#5381joshmoore merged 6 commits intoome:developfrom
Conversation
|
Followed the steps as suggested, OMERO.web works as expected. Looks good to merge (to me) |
| @@ -0,0 +1,30 @@ | |||
| #sendfile on; | |||
There was a problem hiding this comment.
Perhaps either remove these or extend this comment block to say that such properties should be set by the sysadmin. Perhaps include a full working example?
There was a problem hiding this comment.
I'll add a comment. Can you explain what you mean by a full working example?
There was a problem hiding this comment.
server {
listen 80;
server_name $hostname;
# SSL configuration ...
sendfile on;
client_max_body_size 0;
# Include generated file from omero web config nginx-location:
include /opt/omero/web/omero-web-location.include;
}
from the description of this PR.
There was a problem hiding this comment.
OK, I get you. Just worried that it's another piece of commented code that will never be tested. It's essentially omero web config nginx with the location blocks replaced by a single include /opt/omero/web/omero-web-location.include; so if we do modify the existing nginx templates we should also modify this comment.
Also add a test to check the comment and generated location more or less matches the full recommended nginx config.
|
I've updated the comment, and added a test to ensure the comment in |
|
--rebased-to #5387 |
|
Can confirm webclient is working with these changes - big 👍 💯 - I'd need guidance on how to run the tests, or let someone else try the test. |
|
Using omero-web-docker: with nginx.conf: for a passing docker test (barring statics which is under discussion) 👍 Merging and updating the card for the necessary docs. |
What this PR does
This creates a minimal nginx configuration file that can be included in a fixed file created by a sysadmin. This allows custom nginx options to be defined once (e.g. SSL options), instead of having to modify the generated web config after every upgrade, and means any Nginx server options can be used.
Testing this PR
includestatement for the generated omero-web config. This file is exclusively managed by the sysadmin e.g./etc/nginx/conf.d/omero-web-wrapper.conf:includestatement. The expectation is that this would be routinely regenerated on every OMERO.web upgrade. e.g.omero web startRelated reading
Notes
omero web config nginx-locationgenerates thelocationblocks only, other server options are now left for the sysadmin to manage e.g.sendfile on;,client_max_body_size 0;.upstreamblock since there was only one server which means it's redundant, and it would be impossible to auto-generate a load-balanced upstream configuration since you'd need to know the addresses of all OMERO.web backends.