ansible-nodejs-nginx-superv.../tasks/main.yml

13 lines
511 B
YAML
Raw Normal View History

---
- name: configure nginx app with nodejs specific block.
blockinfile:
dest: /etc/nginx/sites-available/{{ nodejs_app_nginx_config }}
insertafter: "# Include your setup to connect to the webapp setup here."
marker: "# -- {mark} NodeJS App config for {{ nodejs_app_name }} --"
block: |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2016-05-19 07:52:46 -04:00
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:{{ nodejs_app_port }};
sudo: yes
notify: restart nginx