Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4859

Networking and servers • Nginx always redirects to https

$
0
0
Hello,

I have three docker containers running on my raspberry. First is homeassistant which is created via default docker compose. Second is nginx connected to third container node app. When I access homeassistant in my local network on the other machine via http everything goes well. When I try to access my node app I receive ERR_SSL_PROTOCOL_ERROR in my browser.

Ping receives data from my raspberry. But curl 192.168.100.82:80 throws an exception

My nginx.conf setup in my container is:

Code:

worker_processes 1;events { worker_connections 1024; }http {    server {        listen 80;        server_name 192.168.100.82;        location / {            proxy_pass http://192.168.100.82:3000;            proxy_redirect off;            proxy_ssl_session_reuse off;            proxy_http_version 1.1;            proxy_set_header Upgrade $http_upgrade;            proxy_set_header Connection 'upgrade';            proxy_set_header Host $host;            proxy_cache_bypass $http_upgrade;        }    }}
Changing proxy_pass to localhost doesn't change anything.

My docker-compose:

Code:

version: '3'services:  app:    build:      context: /my-node-path      dockerfile: Dockerfile    ports:      - "3000:3000"    restart: unless-stopped    privileged: true    network_mode: host  nginx:    image: nginx:latest    ports:      - "80:80"    volumes:      - /my-node-path/nginx.conf:/etc/nginx/nginx.conf    depends_on:      - app    restart: unless-stopped    privileged: true    network_mode: host
Firewall ufw at this point is inactive

How can I bypass it? Thank you for your help

Statistics: Posted by pablojakub — Tue Jun 25, 2024 7:18 am



Viewing all articles
Browse latest Browse all 4859

Trending Articles