# REMOVE THIS LINE BEFORE SUBMITTING: The structure of the file (all of the existing lines) should be kept as close as possible to this template.
# REMOVE THIS LINE BEFORE SUBMITTING: Look through this file for <tags> and replace them. Review other sample files to see how things are done.
# REMOVE THIS LINE BEFORE SUBMITTING: The comment lines at the top of the file (below this line) should explain any prerequisites for using the proxy such as DNS or app settings.
# first go into <container_name> settings, under "General" set the URL Base to /<container_name>/ and restart the <container_name> container
location /nodered {
return 301 $scheme://$host/nodered/;
}
location ^~ /nodered/ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia, also enable authelia-server.conf in the default site config
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app node-red;
set $upstream_port 1880;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
# REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
}
it’s a little hard to read your post… so i didn’t, but if you get this error, it means you did something wrong. just based on the subject, i can say you put node-red.subfolder.conf in the wrong place, it likely also contains an inappropriate location directive on line 6.
I suggest using our templates, in the same location you find them, and modifying that.
Thank you for your response
i just fixed the formatting sorry about that
I got this error by finding the _template.subfolder.conf.sample and renaming it and just filling in the blanks
container_name changed to node-red
port_number change to 1880
http or https changed to http
The home assistant webpage loads but the nodered area stays blank… i wonder what else i have to do, maybe fill in the blanks at the bottom?
# REMOVE THIS LINE BEFORE SUBMITTING: Some proxies require one or more additional location blocks for things like API or RPC endpoints.
# REMOVE THIS LINE BEFORE SUBMITTING: If the proxy you are making a sample for does not require an additional location block please remove the commented out section below.
# location ^~ /<container_name>/api {
# include /config/nginx/proxy.conf;
# resolver 127.0.0.11 valid=30s;
# set $upstream_app <container_name>;
# set $upstream_port <port_number>;
# set $upstream_proto <http or https>;
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#
# # REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
# }
you probably need some kinda websocket stuff… i would ask the node-red people… there’s also a chance that subfolder just isn’t supported by the app itself (it’s why we prefer subdomain, it has no dependence on the app.)
you could take a look at… actually maybe the homeasistant one has websockets… i know some of them do, you can use that as an example