Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

nginx reverse proxy websocket #447

Open
antoinebou12 opened this issue Oct 12, 2020 · 0 comments
Open

nginx reverse proxy websocket #447

antoinebou12 opened this issue Oct 12, 2020 · 0 comments

Comments

@antoinebou12
Copy link

antoinebou12 commented Oct 12, 2020

I want to use droppy with my reverse proxy in nginx but I get a websocket error, but not when I use the direct IP and port

client.js:27 WebSocket connection to 'ws://droppy.domain.com/!/socket' failed: Error during WebSocket handshake: Unexpected response code: 307

nginx config file

events {
}
http {
  server {
      listen 80;
      server_name droppy.domain.com;
      access_log /var/log/nginx/droppy.log;
      error_log /var/log/nginx/droppy-error.log;
      location / {
          proxy_pass http://ip:8989;
      }
  }
}

droppy conf

{
  "listeners": [
    {
      "host": [
        "0.0.0.0",
        "::"
      ],
      "port": 8989,
      "socket": "/tmp/droppy",
      "protocol": "http"
    }
  ],
  "public": true,
  "timestamps": true,
  "linkLength": 5,
  "linkExtensions": false,
  "logLevel": 2,
  "maxFileSize": 0,
  "updateInterval": 1000,
  "pollingInterval": 0,
  "keepAlive": 20000,
  "uploadTimeout": 604800000,
  "allowFrame": false,
  "readOnly": false,
  "ignorePatterns": [],
  "watch": true,
  "headers": {}
}

docker

version: '3.7'
services:
  droppy:
    container_name: droppy
    image: silverwind/droppy
    environment:
      - UID=1000
      - GID=1000
    ports:
      - '8989:8989'
    volumes:
      - /mnt/sdb/droppy/config:/config
      - /mnt/sdb/droppy/data:/files
    restart: unless-stopped
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant