Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404/500 Errors when pasting binary #33

Open
ki9us opened this issue Feb 4, 2025 · 0 comments
Open

404/500 Errors when pasting binary #33

ki9us opened this issue Feb 4, 2025 · 0 comments

Comments

@ki9us
Copy link

ki9us commented Feb 4, 2025

When I try to drag/drop a file or CTRL+V a binary, I get redirected to this URL (which 404s):

https://bin.domain.tld/<html><head><title>500 Internal Server Error</title></head><body><center><h1>500 Internal Server Error</h1></center><hr><center>nginx/1.22.1</center></body></html>.jpg

Dragging and dropping a text file works fine.

The bin logs don't help:

Rocket has launched from http://0.0.0.0:6162
   >> Remote left: channel closed.
   >> Remote left: channel closed.
   >> Remote left: channel closed.
   >> Remote left: channel closed.
   >> No matching routes for GET /%3Chtml%3E%3Chead%3E%3Ctitle%3E500%20Internal%20Server%20Error%3C/title%3E%3C/head%3E%3Cbody%3E%3Ccenter%3E%3Ch1%3E500%20Internal%20Server%20Error%3C/h1%3E%3C/center%3E%3Chr%3E%3Ccenter%3Enginx/1.22.1%3C/center%3E%3C/body%3E%3C/html%3E.jpg text/html.
   >> No 404 catcher registered. Using Rocket default.

My full docker-compose.yml:

networks:
  bin:
    name: my_bin
    ipam:
      config:
        - subnet: "172.29.4.0/24"
services:
  bin:
    image: wantguns/bin
    container_name: my_bin
    networks:
      bin:
        ipv4_address: 172.29.4.2
    volumes:
      - /var/spool/bin:/upload

My nginx proxy config:

upstream my_bin {
        server 172.29.4.2:6162;
}
server {
        server_name bin.domain.tld;
        listen 80;
        listen [::]:80;
        return 302 https://$host;
} server {
        server_name bin.domain.tld;
        listen 443 ssl;
        listen [::]:443 ssl;
                ssl_certificate         /etc/letsencrypt/live/domain.tld/fullchain.pem;
                ssl_certificate_key     /etc/letsencrypt/live/domain.tld/privkey.pem;
        location / {
                proxy_pass       http://my_bin;
                proxy_set_header        Host    $host;
                proxy_set_header        Connection      $http_connection;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant