profile
viewpoint

Ask questions404 Site netp.doctorpcwin.ru is not served on this interface

When I installed ssl, I have started to get this error:

404 Site netp.doctorpcwin.ru is not served on this interface

CaddyFile:

http://netp.doctorpcwin.ru https://net.doctorpcwin.ru {
        tls {
            load /var/snap/wekan/common/certs
            alpn http/1.1
        }
        proxy / localhost:80 {
          websocket
          transparent
        }
}

Please help. Thanks

wekan/wekan

Answer questions xet7

With custom SSL cert, like https://github.com/wekan/wekan/wiki/Caddy-Webserver-Config

http://netp.doctorpcwin.ru https://net.doctorpcwin.ru {
        tls {
            load /var/snap/wekan/common/certs
            alpn http/1.1
        }
        proxy / localhost:3001 {
          websocket
          transparent
        }
}

Wekan runs at localhost port 3001 (or some other you configure it to use). Caddy 443 proxies to localhost 3001 Wekan. Caddy http is at 80 and Caddy https is at 443.

sudo snap set wekan caddy-enabled='true'
sudo snap set wekan port='3001'
sudo snap set wekan root-url='https://netp.doctorpcwin.ru'

If you don't use CloudFlare to redirect from http to https, you can also redirect this way:

http://netp.doctorpcwin.ru {
        redir https://net.doctorpcwin.ru{uri}
}

https://net.doctorpcwin.ru {
        tls {
            load /var/snap/wekan/common/certs
            alpn http/1.1
        }
        proxy / localhost:3001 {
          websocket
          transparent
        }
}

Alternatively, automatic Let's Encrypt SSL cert this way:

netp.doctorpcwin.ru {
        tls {
            load /var/snap/wekan/common/certs
            alpn http/1.1
        }
        proxy / localhost:3001 {
          websocket
          transparent
        }
}

More Caddy examples

useful!
source:https://uonfu.com/
Github User Rank List