HTTPS with Snap in production

I have the following configuration for my Snap

  Local.withPool 2 $ \pool -> do
Local.parallel_ pool [ httpServe (setPort (read port) config) Main.skite
                     --, httpServe (setPort 8003 config) Ws.brz
                     ]

--httpServe (setPort 8003 config) Ws.brz
where
 config =
     setErrorLog  ConfigNoLog $
     setAccessLog ConfigNoLog $
     setSSLPort 443 $
     setSSLCert "/etc/letsencrypt/../cert.pem" $
     setSSLKey "/etc/letsencrypt/../privkey.pem" $
     defaultConfig

      

After creating and uploading all certificates in place, but https://

won't work. Do you have any clues?

thank

+3


source to share


1 answer


I did this:

First of all, I added two lines to the config



     setSSLBind "0.0.0.0" $
     setSSLChainCert False $

      

After that it is very important to build with help ghc -threaded

and this will start it up and run

0


source







All Articles