Coder Social home page Coder Social logo

Comments (6)

acourter27 avatar acourter27 commented on July 18, 2024 3

Thanks! I tried using the link he had above but I must have missed something.

When I added these two lines it started working:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

from send.

ucyo avatar ucyo commented on July 18, 2024 2

For future reference: The error in our setup was, that send is running in user space (uid:gid 1000:1000) and the folder mounted via docker did not have the correct access rights. Be sure to check that the uid:gid are valid.

from send.

acourter27 avatar acourter27 commented on July 18, 2024 1

I'm running the docker container with my own nginx instance separately.

I have nginx set to route my domain to localhost:8006, and I'm running docker with this command:

sudo docker run -v $PWD/uploads:/uploads -p 8006:1443
-e 'DETECT_BASE_URL=true'
-e 'REDIS_HOST=localhost'
-e 'BASE_URL=https://[domain]' \ << (it uses my actual domain here)
registry.gitlab.com/timvisee/send:latest

The site is coming up without issue, but I can't upload. If I navigate to localhost:8006 I can upload a file without issue. Then, if I take that link, and replace localhost with my domain, I can download without issue.

When looking at the network web inspector, it gets to 'ws' and stops - the WebSocket Connection is Established but then immediately closed.

I believe it's something in my nginx configuration, but I can't figure it out. (As with above, the [domain] section actually has my domain info in it on my server.)

`server {
server_name [domain];
location / {
proxy_pass "http://localhost:8006";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/[domain]/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/[domain]/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
if ($host = [domain]) {
return 301 https://$host$request_uri;
} # managed by Certbot

    listen 80;
    server_name [domain];
return 404; # managed by Certbot

}`

from send.

timvisee avatar timvisee commented on July 18, 2024

You might find this template useful: https://github.com/timvisee/send-docker-compose

It is not a direct Nginx template, but it uses Nginx as reverse proxy.

from send.

UncleSamulus avatar UncleSamulus commented on July 18, 2024

Yes, thanks, but I didn't used docker.

from send.

ekimber avatar ekimber commented on July 18, 2024

You are missing the HTTP upgrade config.
Look here:
https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-configure-nginx-for-websockets/
or in the link posted in the first comment

from send.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.