my_webapp_ynh/conf/nginx-nodejs.conf
Antoine Lima 9c6143df27
Add NodeJS server as an alternative to PHP
This adds:
- Two entries in the manifest:
    - A choice for the NodeJS version
    - A port (provisionned in any case due to ynh limitations, but this should not matter)
- Services and configs:
    - Systemctl configs to run the NodeJS server
    - A watcher service and path to restart NodeJS upon file update
    - A custom NGinx config because it is incompatible with the default one
- Docs:
    - More info in the description and admin

The install/remove/backup/restore have been adapted and tested.
The upgrade script is updated but not tested
The change_url script does not change

It is not possible to have both PHP and NodeJS to keep the scripts simple.
2024-03-10 14:43:30 +01:00

14 lines
394 B
Text

#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location / {
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Scheme https;
proxy_buffering off;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}