-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuration of nginx_ssl_directory #17
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution. I am currently in the process of rewriting both this role and my let's encrypt role. A configurable SSL location and multiple certificates (at the LE level) are on the list. Going to keep this PR open as a reminder until they are both ready. |
Cool (I just submitted a small PR to your LE role also). Both these Ansible roles have already saved me time, so I look forward to the improved versions! |
Instead of hardcoding it to /etc/nginx/ssl
It doesn't make sense to have an upstream followed by =404. The @upstream parameter must be the last parameter. http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
When set to the name of an upstream, the direct_proxy variable causes ALL requests to be proxied (so there is no try_file directive). This is useful, for example, when proxying to a web server which handles all static content or when the nginx reverse-proxy doesn't have access to the origin server's root directory. Example: direct_proxy: apache upstreams: - name: apache servers: ['apache_upstream_server']
For each entry in nginx_sites, create a file at /etc/nginx/conf.d/common_ssl_site.domains[0].conf containing its SSL configs, and include that in its main configuration files. This should fix upstream Issue #15. Also create /etc/nginx.conf.d/common_ssl_default.conf with the default SSL settings. This is convenient for other vhosts -- including those not managed by this role -- to be able to import.
I forgot everything in conf.d is included by the default nginx.conf file. Better to keep our configurations separate.
I forgot the /etc/nginx/conf.d/ dir is included by the main nginx.conf file. Store configuration snippets in our own directory (/etc/nginx/ansible-nginx-conf.d) instead.
For each entry in nginx_sites, create a file at /etc/nginx/conf.d/common_ssl_site.domains[0].conf containing its SSL configs, and include that in its main configuration files. This should fix upstream Issue #15. Also create /etc/nginx.conf.d/common_ssl_default.conf with the default SSL settings. This is convenient for other vhosts -- including those not managed by this role -- to be able to import.
nginx_main_directives works the same as nginx_http_directives but is outside of http block.
For my use case it will likely be convenient to be able to configure the directory where the SSL certificate/key is located (instead of hardcoding it to /etc/nginx/ssl). I have only very quickly tested this patch.