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

13 lines
499 B
YAML

---
- 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;
proxy_set_header Host $host;
proxy_pass 127.0.0.1:{{ nodejs_app_port }};
sudo: yes
notify: restart nginx