I have a RPi with Raspian OS.

On the RPi there is an app called lab_app, running on port 80.

I have installed Nginx.
I have configured Nginx via file /var/www/lab_app/lab_app_nginx.conf and symbolically linked to the location of ngnix configurations

ln -s /var/www/lab_app/lab_app_nginx.conf /etc/nginx/conf.d/

the content of /var/www/lab_app/lab_app_nginx.conf is

server {
    listen      80;
    server_name localhost;
    charset     utf-8;
    client_max_body_size 75M;
    location /static {
        root /var/www/lab_app/;
    location / { try_files $uri @labapp; }
    location @labapp {
        include uwsgi_params;
        uwsgi_pass unix:/var/www/lab_app/lab_app_uwsgi.sock;        

The RPi and my PC are both linked to the same wifi.
From my pc I can ping the RPi, access it via ssh, and also access via browser the app, by inserting the LAN RPi ip address.

I have exposed the RPi port 80 through my modem UI by following this tutorial,
The UI shows in section NAT forwarding :

service type: HTTP
external port: 80
internal ip:
internal port: 80
protocol: TCP

In my modem UI, on section network > internet, I can see my modem ip address.

From my PC, as insert in the browser url bar the modem ip address, it shows the app.

But as I do it from a device not connected to my wifi (e.g. my mobile phone connected with a SIM), I cannot access the app, and I get error message

impossible to reach teh website. ERR_ADDRESS_UNREACHABLE

What am I doing wrong?

In nginx log /var/log/nginx/error.log there is just this message

2024/02/22 21:44:05 [error] 625#625: *1061 connect() to unix:/var/www/lab_app/lab_app_uwsgi.sock failed (111: Connection refused) while connecting to upstream, client:, server: localhost, request: "GET /lab_temp HTTP/1.1", upstream: "uwsgi://unix:/var/www/lab_app/lab_app_uwsgi.sock:", host: "", referrer: ""

1 Answer 1


The phone operator of the wifi network provided by my modem does not allow port forwarding, that is why the ERR_ADDRESS_UNREACHABLE error was raised.

they say "the network is filtered and NATted with real shared IPs, there is no chance to show the server outside the LAN".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.