mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-12-16 15:30:34 +00:00
allow for special production nginx configuration
This commit is contained in:
parent
2a3e519f0e
commit
d834754054
@ -21,7 +21,7 @@
|
|||||||
- nginx
|
- nginx
|
||||||
- passenger
|
- passenger
|
||||||
|
|
||||||
- template: dest='/etc/nginx/conf.d/{{ ansible_fqdn }}.conf'
|
- template: dest='/etc/nginx/conf.d/easyredmine.conf'
|
||||||
src=nginx.conf.j2
|
src=nginx.conf.j2
|
||||||
sudo: yes
|
sudo: yes
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
{% if is_production_vm %}
|
||||||
|
server_name redmine.apidb.org;
|
||||||
|
{% else %}
|
||||||
server_name {{ ansible_fqdn }};
|
server_name {{ ansible_fqdn }};
|
||||||
|
{% endif %}
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443;
|
listen 443;
|
||||||
|
{% if is_production_vm %}
|
||||||
|
server_name redmine.apidb.org;
|
||||||
|
{% else %}
|
||||||
server_name {{ ansible_fqdn }};
|
server_name {{ ansible_fqdn }};
|
||||||
|
{% endif %}
|
||||||
ssl on;
|
ssl on;
|
||||||
ssl_certificate /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
|
ssl_certificate /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
|
||||||
ssl_certificate_key /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
|
ssl_certificate_key /etc/pki/tls/certs/{{ ansible_fqdn }}.pem;
|
||||||
|
Loading…
Reference in New Issue
Block a user