chsasank / outline-wiki-docker-compose

Installation and docker compose to self host outline wiki: https://www.getoutline.com/
295 stars 77 forks source link

nginx proxy wss #35

Open zhongshanliyu opened 2 years ago

zhongshanliyu commented 2 years ago

nginx proxy need add

location /realtime/ { proxy_pass http://outline:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; }

VityaSchel commented 2 years ago

still getting 400 http error

lexermal commented 2 years ago

I managed to get it running by adapting the default.conf with this:


server {
  listen        80;
  client_max_body_size 100m;

  location /realtime/ {
    proxy_pass http://outline_main_container:3000;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
  }

  location /collaboration/ {
    proxy_pass http://outline_main_container:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
  }

  # Proxy requests to the bucket "outline" to MinIO server running on port 9000
  location /outline-bucket {
    include /etc/nginx/conf.d/include/proxy.conf;
    proxy_pass http://minio:9000;
  }

  # Proxy any other request to the application server running on port 9001
  location / {
    include /etc/nginx/conf.d/include/proxy.conf;
    proxy_pass http://outline_main_container:3000;
  }
}