mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Refine Node-RED on NGINX w/o Apache
This commit is contained in:
parent
fa852af6d1
commit
ede56d3197
5 changed files with 18 additions and 40 deletions
|
@ -10,9 +10,10 @@
|
|||
|
||||
2. Without PHP available via FastCGI, any function at all for PHP-based applications validates NGINX.
|
||||
|
||||
3. Current state of IIAB App/Service migrations as of 2021-05-21: *(SEE ALSO [#2762](https://github.com/iiab/iiab/issues/2762))*
|
||||
3. Current state of IIAB App/Service migrations as of 2021-07-06: *(SEE ALSO [#2762](https://github.com/iiab/iiab/issues/2762))*
|
||||
|
||||
1. These support "Native" NGINX but ***NOT*** Apache
|
||||
|
||||
* Admin Console
|
||||
* captiveportal
|
||||
* IIAB documentation (http://box/info)
|
||||
|
@ -22,6 +23,7 @@
|
|||
* usb_lib
|
||||
|
||||
2. These support "Native" NGINX ***AND*** Apache, a.k.a. "dual support" for legacy testing (if suitable "Shims" from *Section iii.* below are preserved!) Both "Native" NGINX and "Shim" proxying from NGINX to Apache port 8090 *cannot be enabled simultaneously* for these IIAB Apps/Service:<!--But if you want to attempt their "Shim" proxying legacy testing mode, try setting your *primary web server* to Apache using `apache_install: True` and `apache_enabled: True` (and `nginx_enabled: False` to disable NGINX) in [/etc/iiab/local_vars.yml](http://wiki.laptop.org/go/IIAB/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it.3F) before you install IIAB. You may also need to run `cd /opt/iiab/iiab; ./runrole httpd` since this has been removed from [roles/3-base-server/tasks/main.yml](https://github.com/iiab/iiab/blob/master/roles/3-base-server/tasks/main.yml)-->
|
||||
|
||||
* awstats
|
||||
* calibre-web
|
||||
* gitea
|
||||
|
@ -29,17 +31,19 @@
|
|||
* kolibri
|
||||
* lokole
|
||||
* mediawiki
|
||||
* moodle
|
||||
* munin
|
||||
* nextcloud
|
||||
* nodered
|
||||
* sugarizer
|
||||
* wordpress
|
||||
* nodered
|
||||
|
||||
3. These support Apache but ***NOT*** "Native" NGINX. They use a "Shim" to [proxy_pass](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/) from NGINX to Apache on port 8090. See [roles/3-base-server/tasks/main.yml#L11](../3-base-server/tasks/main.yml#L11) for a list of ~6 IIAB Apps/Services that auto-enable Apache.
|
||||
|
||||
* elgg
|
||||
* moodle [*, PLEASE HELP IF YOU CAN: [#2785](https://github.com/iiab/iiab/issues/2785)]
|
||||
|
||||
4. These each run their own web server or non-web / backend services, e.g. off of their own [unique port(s)](https://github.com/iiab/iiab/wiki/IIAB-Networking#list-of-ports--services) (IIAB home pages link directly to these destinations). In future we'd like mnemonic URL's for all of these: (e.g. http://box/calibre, http://box/archive, http://box/kalite)
|
||||
|
||||
* bluetooth
|
||||
* calibre (menu goes directly to port 8080)
|
||||
* cups (menu goes directly to port 631) [*, shim not yet in place, [PR #2775](https://github.com/iiab/iiab/pull/2775)]
|
||||
|
@ -55,4 +59,4 @@
|
|||
* transmission
|
||||
* vnstat
|
||||
|
||||
[*] The 5 above starred roles could use improvement, as of 2021-05-21.
|
||||
[*] The 4 above starred roles could use improvement, as of 2021-07-06.
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
#- name: "Set 'apache_install: True' and 'apache_enabled: True'"
|
||||
# set_fact:
|
||||
# apache_install: True
|
||||
# apache_enabled: True
|
||||
|
||||
#- name: APACHE - run 'httpd' role
|
||||
# include_role:
|
||||
# name: httpd
|
||||
|
||||
|
||||
# 2019-01-16: @jvonau's PR #1403 moved installation of Node.js (8.x for now) &
|
||||
# npm to roles/nodejs/tasks/main.yml
|
||||
# 2019-01-16: @jvonau's PR #1403 moved installation of Node.js [8.x at the time]
|
||||
# and npm to roles/nodejs/tasks/main.yml
|
||||
|
||||
- name: "Set 'nodejs_install: True' and 'nodejs_enabled: True'"
|
||||
set_fact:
|
||||
|
@ -48,7 +38,7 @@
|
|||
state: absent
|
||||
when: nodered_install
|
||||
|
||||
# 2012-02-13: the 6 RPi stanzas below recreate Raspbian Desktop's Node-RED
|
||||
# 2019-02-13: the 6 RPi stanzas below recreate Raspbian Desktop's Node-RED
|
||||
# environment, inspired by:
|
||||
# https://nodered.org/docs/hardware/raspberrypi
|
||||
# https://github.com/node-red/raspbian-deb-package/blob/master/resources/update-nodejs-and-nodered
|
||||
|
@ -112,13 +102,6 @@
|
|||
dest: /etc/systemd/system/nodered.service
|
||||
# mode: '0666'
|
||||
|
||||
- name: Install /etc/{{ apache_conf_dir }}/nodered.conf from template
|
||||
template:
|
||||
backup: yes
|
||||
src: nodered.conf.j2
|
||||
dest: "/etc/{{ apache_conf_dir }}/nodered.conf"
|
||||
# mode: '0666'
|
||||
|
||||
# SEE ALSO THE apache2_module SECTION IN roles/httpd/tasks/main.yml
|
||||
#- name: Enable proxy_wstunnel apache2 module
|
||||
# apache2_module:
|
||||
|
|
|
@ -39,14 +39,8 @@
|
|||
state: stopped
|
||||
when: not nodered_enabled
|
||||
|
||||
#- name: Enable/Disable/Restart Apache if primary
|
||||
- name: SHIM FOR NOW SO ALWAYS DO THE...Enable/Disable/Restart Apache
|
||||
include_tasks: apache.yml
|
||||
when: not nginx_enabled
|
||||
|
||||
- name: Enable/Disable/Restart NGINX if primary
|
||||
- name: Enable/Disable/Restart NGINX
|
||||
include_tasks: nginx.yml
|
||||
when: nginx_enabled
|
||||
|
||||
|
||||
- name: Add 'nodered' variable values to {{ iiab_ini_file }}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
# 'nodered_port: 1880' is set in /opt/iiab/iiab/vars/default_vars.yml
|
||||
# https://github.com/iiab/iiab/wiki/IIAB-Networking#list-of-ports--services
|
||||
|
||||
location /nodered/ {
|
||||
proxy_pass http://127.0.0.1:1880/nodered/;
|
||||
proxy_pass http://127.0.0.1:{{ nodered_port }}/nodered/;
|
||||
}
|
||||
|
||||
location /nodered/debug/ws/ {
|
||||
proxy_pass http://127.0.0.1:1880/nodered/debug/ws;
|
||||
proxy_pass http://127.0.0.1:{{ nodered_port }}/nodered/debug/ws;
|
||||
}
|
||||
|
||||
location /nodered/comms/ {
|
||||
proxy_pass http://127.0.0.1:1880/nodered/comms;
|
||||
proxy_pass http://127.0.0.1:{{ nodered_port }}/nodered/comms;
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
ProxyPreserveHost On
|
||||
ProxyRequests Off
|
||||
ProxyPass /{{ nodered_web_path }}/debug/ws ws://localhost:{{ nodered_port }}/{{ nodered_web_path }}/debug/ws
|
||||
ProxyPass /{{ nodered_web_path }}/comms ws://localhost:{{ nodered_port }}/{{ nodered_web_path }}/comms
|
||||
ProxyPass /{{ nodered_web_path }} http://localhost:{{ nodered_port }}/{{ nodered_web_path }}
|
||||
ProxyPassReverse /{{ nodered_web_path }} http://localhost:{{ nodered_port }}/{{ nodered_web_path }}
|
Loading…
Add table
Reference in a new issue