NGINX/Raspberry Pi 4 Hotspot/Node-RED reverse proxy problem

I have replaced IP address’ first dot below with an underscore because when I attempt to create this topic, the forum pushes back and says that I can only include 2 links in a post. Sorry.

**My issue:
Hello. I am looking for help with an NGINX/Raspberry Pi 4 Hotspot/Node-RED reverse proxy implementation. Furthermore, I am utilizing NetworkManager and dnsmasq. As far as I can tell, I have everything set up per the instructions I have found on various bulletin boards, FAQ’s etc., etc. Apparently not…

I have a Raspberry Pi 4 set up as a Hotspot (which apparently isn’t the same as an access point). The hotspot performance of our application is better than that of an access point, so we need to leave it as-is.
I have two Node-RED instances running. The Raspberry Pi’s wired port is not connected. When I connect to the hotspot on my computer or phone, I can see that the DNS address points to the Raspberry Pi. I think this is simply because I have stated in the NetworkManager setup that is the DNS address.
I have set up my /etc/nginx/conf.d/remote.conf file as:

server
{
listen 80;
server_name field.interface;

location /
{
resolver 127_0.0.1;
proxy_pass http://10_0.123.1:1880/ui/;
}

}

server
{
listen 80;
server_name stmu.viewer;

location /
{
resolver 127_0.0.1;
proxy_pass http://10_0.123.1:1881/ui/;
}

}

When I try going to “field.interface/” or “stmu.viewer/”, I get a web browser error that the page is not found. I have to include the trailing ‘/’ or else the web browser tries to perform a Google search. If I redirect to the actual address (10_0.123.1:1880:ui or 10_0.123.1:1881:ui), the pages show up just fine. If I do a “curl field.interface” within a SSH session, the system responds to the name.
Here’s the strange point. If I connect to our corporate LAN, then I can connect via server name on either my computer or my phone. Once I disconnect from the corporate LAN, I can still connect via name. Once I reboot the Raspberry Pi, it goes back to no name resolution. This is web browser independent.
I am sure I am leaving out some configuration file information you will need to answer this question; apologies in advance. Suggestions are greatly appreciated. Thank you.

**

How I encountered the problem: installed NGINX per websites’ suggestions

Solutions I’ve tried:

Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric): 1.22.1

Deployment environment: Raspberry Pi debian

Minimal NGINX config to reproduce your issue (preferably running on https://tech-playground.com/playgrounds/nginx for ease of debugging, and if not as a code block): (Tip → Run nginx -T to print your entire NGINX config to your terminal.)

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

configuration file /etc/nginx/nginx.conf:

user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;

multi_accept on;

}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

}

mail {

# See sample authentication script at:

# GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

# auth_http localhost/auth.php;

# pop3_capabilities “TOP” “USER”;

# imap_capabilities “IMAP4rev1” “UIDPLUS”;

server {

listen localhost:110;

protocol pop3;

proxy on;

}

server {

listen localhost:143;

protocol imap;

proxy on;

}

#}

configuration file /etc/nginx/mime.types:

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;

text/mathml                           mml;
text/plain                            txt;
text/vnd.sun.j2me.app-descriptor      jad;
text/vnd.wap.wml                      wml;
text/x-component                      htc;

image/avif                            avif;
image/png                             png;
image/svg+xml                         svg svgz;
image/tiff                            tif tiff;
image/vnd.wap.wbmp                    wbmp;
image/webp                            webp;
image/x-icon                          ico;
image/x-jng                           jng;
image/x-ms-bmp                        bmp;

font/woff                             woff;
font/woff2                            woff2;

application/java-archive              jar war ear;
application/json                      json;
application/mac-binhex40              hqx;
application/msword                    doc;
application/pdf                       pdf;
application/postscript                ps eps ai;
application/rtf                       rtf;
application/vnd.apple.mpegurl         m3u8;
application/vnd.google-earth.kml+xml  kml;
application/vnd.google-earth.kmz      kmz;
application/vnd.ms-excel              xls;
application/vnd.ms-fontobject         eot;
application/vnd.ms-powerpoint         ppt;
application/vnd.oasis.opendocument.graphics        odg;
application/vnd.oasis.opendocument.presentation    odp;
application/vnd.oasis.opendocument.spreadsheet     ods;
application/vnd.oasis.opendocument.text            odt;
application/vnd.openxmlformats-officedocument.presentationml.presentation    pptx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet    xlsx;
application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
application/vnd.wap.wmlc              wmlc;
application/wasm                      wasm;
application/x-7z-compressed           7z;
application/x-cocoa                   cco;
application/x-java-archive-diff       jardiff;
application/x-java-jnlp-file          jnlp;
application/x-makeself                run;
application/x-perl                    pl pm;
application/x-pilot                   prc pdb;
application/x-rar-compressed          rar;
application/x-redhat-package-manager  rpm;
application/x-sea                     sea;
application/x-shockwave-flash         swf;
application/x-stuffit                 sit;
application/x-tcl                     tcl tk;
application/x-x509-ca-cert            der pem crt;
application/x-xpinstall               xpi;
application/xhtml+xml                 xhtml;
application/xspf+xml                  xspf;
application/zip                       zip;

application/octet-stream              bin exe dll;
application/octet-stream              deb;
application/octet-stream              dmg;
application/octet-stream              iso img;
application/octet-stream              msi msp msm;

audio/midi                            mid midi kar;
audio/mpeg                            mp3;
audio/ogg                             ogg;
audio/x-m4a                           m4a;
audio/x-realaudio                     ra;

video/3gpp                            3gpp 3gp;
video/mp2t                            ts;
video/mp4                             mp4;
video/mpeg                            mpeg mpg;
video/quicktime                       mov;
video/webm                            webm;
video/x-flv                           flv;
video/x-m4v                           m4v;
video/x-mng                           mng;
video/x-ms-asf                        asx asf;
video/x-ms-wmv                        wmv;
video/x-msvideo                       avi;

}

configuration file /etc/nginx/conf.d/remote.conf:

server
{
listen 80;
server_name field.interface;

location /
{
    resolver 127_0.0.1;
    proxy_pass http://10_0.123.1:1880/ui/;
}

}

server
{
listen 80;
server_name stmu.viewer;

location /
{
    resolver 127_0.0.1;
    proxy_pass http://10_0.123.1:1881/ui/;
}

}

configuration file /etc/nginx/sites-enabled/remote.conf:

#server
#{

listen 80;

server_name field.interface;

location /

{

resolver 127_0.0.1;

proxy_pass http://10_0.123.1:1880/ui/;

}

#}

#server
#{

listen 80;

server_name stmu.viewer;

location /

{

resolver 127_0.0.1;

proxy_pass http://10_0.123.1:1881/ui/;

}

#}

NGINX access/error log: *(Tip → You can usually find the logs in the /var/log/nginx directory.)
Not sure which file you would like to se here. There is nothing in error.log and access log (since reboot) is
127.0.0.1 - - [28/Oct/2025:07:22:12 -0500] “GET / HTTP/1.1” 200 1733 “-” “curl/7.88.1”
*

1 Like

Hey @chriskern97!

Based on what you are saying and the fact that things work fine when you connect to your corporate LAN, I get the feeling this might be a DNS issue instead of an NGINX issue. I’d suggest starting trying to debug your issue by looking at that option.

Thanks for the advice. I will try working on the dnsmasq/NetworkManager combination of settings. Much appreciated.

1 Like

The dnsmasq was the issue; it does not like to play nice with NetworkManager.

The solution (for my situation) was to set up NM with method=manual and then set all my configuration files inside the /etc/NetworkManager/dnsmasq.d folder.

1 Like

That’s great to hear! Glad you could figure it out!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.