我试图编写一个使用SSL的简单Happstack应用程序。使用此源代码:
module Main where
import Happstack.Server( ok )
import Happstack.Server.SimpleHTTPS( TLSConf(..), nullTLSConf, simpleHTTPS )
conf :: TLSConf
conf = nullTLSConf{
tlsPort = 8011
, tlsCert = "server.crt"
, tlsKey = "server.key"
}
main :: IO ()
main = simpleHTTPS nullTLSConf $ ok "Hello, World!"
它可以编译,但是,当我以普通用户身份运行时,我得到:
mytest: bind: permission denied (Permission denied)
当我以root身份运行时,我得到:
mytest: user error (error:02001002:system library:fopen:No such file or directory)
我做错了什么?