# Internal server error when proxing to https with self-signed cert

**URL:** <https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087>\
**Category:** Traefik v2\
**Tags:** file\
**Created:** [July 3, 2021, 8:38pm UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087 "2021-07-03T20:38:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![svirus](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@svirus](https://community.traefik.io/u/svirus)\
**Post date:** [July 3, 2021, 8:38pm UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087/1 "2021-07-03T20:38:03Z")

</div>

Hi,  
I try to make proxy working from my traefik with docker and file dynamic configuration, and I have error when I try to proxy to htts (proxmox web interface on another host).  
Error is 500 Internal server error.  
I see that there is some packages recived by my promox web interface, but nothing more 😕  
I turned off my proxmox server and after this traefik show me "Bad gateway" so I think the configuration is working

My config:  
rules.yml:  
http:  
routers:  
pve1\_krk\_route:  
rule: "Host(`pve1.xxxx.pl`)"  
service: pve1\_krk  
entryPoints:  
- websecure  
tls:  
certResolver: le

services:  
pve1\_krk:  
loadBalancer:  
servers:  
- url: "[https://192.168.0.61:8006](https://192.168.0.61:8006)"

traefik debug file:

time="2021-07-03T22:35:14+02:00" level=debug msg="vulcand/oxy/roundrobin/rr: begin ServeHttp on request" Request="{"Method":"GET","URL":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""},"Proto":"HTTP/2.0","ProtoMajor":2,"ProtoMinor":0,"Header":{"Accept":["_/_"],"User-Agent":["curl/7.76.1"],"X-Forwarded-Host":["pve1.xxxx.pl"],"X-Forwarded-Port":["443"],"X-Forwarded-Proto":["https"],"X-Forwarded-Server":["35dce1d5c549"],"X-Real-Ip":["xxx.xxx.xxx.162"]},"ContentLength":0,"TransferEncoding":null,"Host":"pve1.xxxx.pl","Form":null,"PostForm":null,"MultipartForm":null,"Trailer":null,"RemoteAddr":"xxx.xxx.xxx.xxx:45574","RequestURI":"/","TLS":null}"  
time="2021-07-03T22:35:14+02:00" level=debug msg="vulcand/oxy/roundrobin/rr: Forwarding this request to URL" Request="{"Method":"GET","URL":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""},"Proto":"HTTP/2.0","ProtoMajor":2,"ProtoMinor":0,"Header":{"Accept":["_/_"],"User-Agent":["curl/7.76.1"],"X-Forwarded-Host":["pve1.xxxxl.pl"],"X-Forwarded-Port":["443"],"X-Forwarded-Proto":["https"],"X-Forwarded-Server":["35dce1d5c549"],"X-Real-Ip":["83.19.215.162"]},"ContentLength":0,"TransferEncoding":null,"Host":"pve1.xxxx.pl","Form":null,"PostForm":null,"MultipartForm":null,"Trailer":null,"RemoteAddr":"xxx.xxx.xxx.xxx:45574","RequestURI":"/","TLS":null}" ForwardURL="[https://192.168.99.61:8006](https://192.168.99.61:8006)"  
time="2021-07-03T22:35:14+02:00" level=debug msg="vulcand/oxy/roundrobin/rr: completed ServeHttp on request" Request="{"Method":"GET","URL":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""},"Proto":"HTTP/2.0","ProtoMajor":2,"ProtoMinor":0,"Header":{"Accept":["_/_"],"User-Agent":["curl/7.76.1"],"X-Forwarded-Host":["pve1.xxxx.pl"],"X-Forwarded-Port":["443"],"X-Forwarded-Proto":["https"],"X-Forwarded-Server":["35dce1d5c549"],"X-Real-Ip":["xxx.xxx.xxx.xxx"]},"ContentLength":0,"TransferEncoding":null,"Host":"pve1.xxxx.pl","Form":null,"PostForm":null,"MultipartForm":null,"Trailer":null,"RemoteAddr":"xxx.xxx.xxx.xxx:45574","RequestURI":"/","TLS":null}"

---

<div class="post-metadata">

**Author:** ![daniel.tomcej](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/daniel.tomcej/32/262_2.png) [@daniel.tomcej](https://community.traefik.io/u/daniel.tomcej)\
**Post date:** [July 6, 2021, 10:31pm UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087/2 "2021-07-06T22:31:38Z")

</div>

Hello @svirus,

If you are going to be proxying to a server that uses a self-signed certificate, you will need to configure a `serversTransport` to tell Traefik how to handle the certificate. You may wish to have Traefik skip the validation and verification of the certficate ([Services - Traefik](https://doc.traefik.io/traefik/routing/services/#insecureskipverify)) or you may want to provide Traefik with a root/intermediate certificate to verify with: ([Services - Traefik](https://doc.traefik.io/traefik/routing/services/#rootcas)).

This will allow Traefik to successfully connect to your TLS-enabled backends with self-signed certificates.

---

<div class="post-metadata">

**Author:** ![svirus](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@svirus](https://community.traefik.io/u/svirus)\
**Post date:** [July 7, 2021, 7:49am UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087/3 "2021-07-07T07:49:03Z")

</div>

Thanks for replay  
Last question...  
I can't find in documentation how can I tell my service to use transport with insceureSkipVerify ?

Where I should it put ?

My configuration is:

```auto
http:
  routers:
    pve1_krk_route:
      rule: "Host(`pve1.xxxx.pl`)"
      service: pve1_krk
      entryPoints:
        - websecure
      tls:
        certResolver: le

  services:
    pve1_krk:
      loadBalancer:
        servers:
          - url: "https://192.168.0.1:8006"
  serversTransports:
    mytransport:
      insecureSkipVerify: true

```

---

<div class="post-metadata">

**Author:** ![daniel.tomcej](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/daniel.tomcej/32/262_2.png) [@daniel.tomcej](https://community.traefik.io/u/daniel.tomcej)\
**Post date:** [July 8, 2021, 8:12pm UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087/4 "2021-07-08T20:12:57Z")

</div>

Hello @svirus,

That looks good, now all you have to do is to tell Traefik to use the serversTransport on your service loadbalancer with the option: ([Services - Traefik](https://doc.traefik.io/traefik/routing/services/#serverstransport))

```yaml
  services:
    pve1_krk:
      loadBalancer:
        serversTransport: mytransport
        servers:
          - url: "https://192.168.0.1:8006"
```

---

<div class="post-metadata">

**Author:** ![svirus](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@svirus](https://community.traefik.io/u/svirus)\
**Post date:** [July 11, 2021, 2:12pm UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087/5 "2021-07-11T14:12:04Z")

</div>

works grate!  
Thanks!

my full working config:

```auto
http:
  routers:
    pve1_krk_route:
      rule: "Host(`pve1.xxxx.pl`)"
      service: pve1_krk
      entryPoints:
        - websecure
      tls:
        certResolver: le

  services:
    pve1_krk:
      loadBalancer:
        serversTransport: insecureTransport
        servers:
          - url: "https://192.168.0.1:8006"

  serversTransports:
    insecureTransport:
      insecureSkipVerify: true

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [July 14, 2021, 2:12pm UTC](https://community.traefik.io/t/internal-server-error-when-proxing-to-https-with-self-signed-cert/11087/6 "2021-07-14T14:12:54Z")

</div>

Closed on July 14, 2021, 2:12pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
