1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-12-16 07:20:36 +00:00

allow for special production nginx configuration

This commit is contained in:
Mark Heiges 2015-12-23 13:03:32 -05:00
parent 2a3e519f0e
commit d834754054
2 changed files with 9 additions and 1 deletions

View File

@ -21,7 +21,7 @@
- nginx
- passenger
- template: dest='/etc/nginx/conf.d/{{ ansible_fqdn }}.conf'
- template: dest='/etc/nginx/conf.d/easyredmine.conf'
src=nginx.conf.j2
sudo: yes
notify: restart nginx

View File

@ -1,12 +1,20 @@
server {
listen 80;
{% if is_production_vm %}
server_name redmine.apidb.org;
{% else %}
server_name {{ ansible_fqdn }};
{% endif %}
return 301 https://$host$request_uri;
}
server {
listen 443;
{% if is_production_vm %}
server_name redmine.apidb.org;
{% else %}
server_name {{ ansible_fqdn }};
{% endif %}
ssl on;
ssl_certificate /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
ssl_certificate_key /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;