Skip to content

400 Bad Request #19

Description

@woutr-nl

Hey Julian,

I'm trying to get it work.
Running on docker with Traefik as a reverse proxy i'm getting this error:

Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

(you can see this on 'https://linkjes.woutr.io')

Editing the port to 80 or back to 443 doesn't solve a thing.
This is my docker-compose file;

`
version: '2'

networks:
web:
external: true

services:
app:
image: julianprieber/littlelink-custom
labels:
- "traefik.http.routers.littlelink.rule=Host(linkjes.woutr.io)"
- "traefik.http.routers.littlelink.tls=true"
- "traefik.http.routers.littlelink.tls.certresolver=lets-encrypt"
- "traefik.http.services.littlelink.loadbalancer.server.port=443"
- "traefik.docker.network=web"
volumes:
- ./data:/htdocs
environment:
- HTTP_SERVER_NAME=linkjes.woutr.io
- HTTPS_SERVER_NAME=linkjes.woutr.io
- SERVER_ADMIN=info@woutr.io
- TZ=Europe/Amsterdam
- PHP_MEMORY_LIMIT=512M
- UPLOAD_MAX_FILESIZE=16M
networks:
- web
restart: always
`

Activity

  1. woutr-nl commented on Oct 10, 2022

    @woutr-nl
    Author

    The error inside my container is:

    today at 16:04:16[Mon Oct 10 14:04:16.717134 2022] [ssl:info] [pid 30] [client 172.19.0.2:49522] AH01964: Connection to child 3 established (server www.example.com:443)
    today at 16:04:16[Mon Oct 10 14:04:16.726372 2022] [ssl:info] [pid 30] [client 172.19.0.2:49522] AH01996: SSL handshake failed: HTTP spoken on HTTPS port; trying to send HTML error page
    today at 16:04:16[Mon Oct 10 14:04:16.729404 2022] [ssl:info] [pid 30] SSL Library Error: error:1408F09C:SSL routines:ssl3_get_record:http request
    today at 16:04:16172.19.0.2 - - [10/Oct/2022:14:04:16 +0000] "GET / HTTP/1.0" 400 442
    today at 16:04:18[Mon Oct 10 14:04:18.188673 2022] [ssl:info] [pid 31] [client 172.19.0.2:49532] AH01964: Connection to child 4 established (server www.example.com:443)
    today at 16:04:18[Mon Oct 10 14:04:18.190837 2022] [ssl:info] [pid 31] [client 172.19.0.2:49532] AH01996: SSL handshake failed: HTTP spoken on HTTPS port; trying to send HTML error page
    today at 16:04:18[Mon Oct 10 14:04:18.192062 2022] [ssl:info] [pid 31] SSL Library Error: error:1408F09C:SSL routines:ssl3_get_record:http request
    today at 16:04:18172.19.0.2 - - [10/Oct/2022:14:04:18 +0000] "GET / HTTP/1.0" 400 442
    today at 16:04:18[Mon Oct 10 14:04:18.278499 2022] [ssl:info] [pid 27] [client 172.19.0.2:49534] AH01964: Connection to child 0 established (server www.example.com:443)
    today at 16:04:18[Mon Oct 10 14:04:18.280178 2022] [ssl:info] [pid 27] [client 172.19.0.2:49534] AH01996: SSL handshake failed: HTTP spoken on HTTPS port; trying to send HTML error page
    today at 16:04:18[Mon Oct 10 14:04:18.280370 2022] [ssl:info] [pid 27] SSL Library Error: error:1408F09C:SSL routines:ssl3_get_record:http request

  2. JulianPrieber commented on Oct 12, 2022

    @JulianPrieber
    Member

    Hey @woutr-nl,

    I saw your post on the community discord.

    I never really used Traefik, so I can't really help you here. I would be happy to point you in the right direction if I find anything.
    I think there was someone who had problems with Traefik before, but I might be wrong here.

    A good step could also be to ask for help on the DBtech Discord.

    We have a section for Reverse Proxies in the README for NGINX. Maybe you can find some documentation on how to apply that to Traefik.

    In any case, please update this issue with anything that could help other people with the same issue. If we can come up with a guide for this, I'll include it in the documentation.

    I wish you all the best with your issue 👍

    Good luck,

  3. jscottelblein commented on Oct 14, 2022

    @jscottelblein
    Contributor

    I think it has to do with setting X-Forwarded-Proto to https.

    Something like:

    - "traefik.http.middlewares.https-redirect.headers.sslproxyheaders.X-Forwarded-Proto=https"

  4. killua99 commented on Oct 23, 2022

    @killua99

    @woutr-nl in the end, I use https://stackoverflow.com/a/45731506 since I was passing right the headers with Traefik, but the docker is set with .env to be local, and the service provider doesn't help to setup the HTTPS either. After that quick hack everything start working without issue

    Edit: This docker only listen to port 80 by default

  5. locked and limited conversation to collaborators on Nov 21, 2022
  6. converted this issue into a discussion #23 on Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions