2015-11-22 02:43:47 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
2015-12-23 18:03:32 +00:00
|
|
|
{% if is_production_vm %}
|
|
|
|
server_name redmine.apidb.org;
|
|
|
|
{% else %}
|
2015-11-22 02:43:47 +00:00
|
|
|
server_name {{ ansible_fqdn }};
|
2015-12-23 18:03:32 +00:00
|
|
|
{% endif %}
|
2015-11-22 02:43:47 +00:00
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443;
|
2015-12-23 18:03:32 +00:00
|
|
|
{% if is_production_vm %}
|
|
|
|
server_name redmine.apidb.org;
|
|
|
|
{% else %}
|
2015-11-22 02:43:47 +00:00
|
|
|
server_name {{ ansible_fqdn }};
|
2015-12-23 18:03:32 +00:00
|
|
|
{% endif %}
|
2015-11-22 02:43:47 +00:00
|
|
|
ssl on;
|
|
|
|
ssl_certificate /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
|
|
|
|
ssl_certificate_key /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
|
|
|
|
root {{ redmine_root_dir }}/public;
|
|
|
|
passenger_enabled on;
|
|
|
|
}
|