mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Apache reverse-proxy for nodered
This commit is contained in:
parent
72142db7b8
commit
ccef7ba2a1
3 changed files with 30 additions and 0 deletions
|
@ -7,3 +7,6 @@ nodered_password_hash: $2b$08$oxgvoU9et3deSbXY8UNVTOWHSTQAyEASIal86RHVMqYQJhpPMN
|
||||||
# To generate a new password hash, run 'node-red-admin hash-pw' and enter the
|
# To generate a new password hash, run 'node-red-admin hash-pw' and enter the
|
||||||
# new password. Paste the resulting hash above. After Ansible runs, username
|
# new password. Paste the resulting hash above. After Ansible runs, username
|
||||||
# and password hash will be placed in: /home/nodered/.node-red/settings.js
|
# and password hash will be placed in: /home/nodered/.node-red/settings.js
|
||||||
|
|
||||||
|
nodered_web_path: nodered
|
||||||
|
nodered_port: 1880
|
||||||
|
|
|
@ -54,6 +54,31 @@
|
||||||
state: started
|
state: started
|
||||||
when: nodered_enabled
|
when: nodered_enabled
|
||||||
|
|
||||||
|
- name: Copy nodered.conf to apache sites-available
|
||||||
|
template:
|
||||||
|
backup: yes
|
||||||
|
src: nodered.conf.j2
|
||||||
|
dest: /etc/apache2/sites-available/nodered.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0666
|
||||||
|
when: nodered_install
|
||||||
|
|
||||||
|
- name: Link nodered.conf to apache sites-enabled
|
||||||
|
file:
|
||||||
|
src: /etc/apache2/sites-available/nodered.conf
|
||||||
|
dest: /etc/apache2/sites-enabled/nodered.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
state: link
|
||||||
|
when: nodered_enabled
|
||||||
|
|
||||||
|
- name: Remove nodered.conf from apache sites-enabled
|
||||||
|
file:
|
||||||
|
path: /etc/apache2/sites-enabled/nodered.conf
|
||||||
|
state: absent
|
||||||
|
when: not nodered_enabled
|
||||||
|
|
||||||
- name: Add 'nodered' variable values to {{ iiab_ini_file }}
|
- name: Add 'nodered' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
path: "{{ iiab_ini_file }}"
|
path: "{{ iiab_ini_file }}"
|
||||||
|
|
2
roles/nodered/templates/nodered.conf
Normal file
2
roles/nodered/templates/nodered.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
ProxyPass /{{ nodered_web_path }} http://localhost:{{ nodered_port }}
|
||||||
|
ProxyPassReverse /{{ nodered_web_path }} http://localhost:{{ nodered_port }}
|
Loading…
Add table
Add a link
Reference in a new issue