如何 运行 使用 sbcl+restas+apache 的网络应用程序?

How to run a web app using sbcl+restas+apache?

最近接到一份工作,要和别人一起写一个web app。他们选择了使用Apache,所以我不得不使用它。但是我在 sbcl 中使用 restas 编写我的程序。所以我很困惑如何 运行 我的应用程序支持 Apache。我试过mod_lisp,但好像没用。我得到的只是一个页面说 :Internal Server Error.

当我检查 apache 错误日志时,我发现:

[core:error] [pid 18294:tid 140614142228224] [client 127.0.0.1:44049] AH00135: Invalid method in request server-protocol

[:error] [pid 18295:tid 140614150620928] (70014)End of file found: error reading from Lisp

现在我更糊涂了....

最简单的方法是配置 Apache to act as a reverse-proxy. Personally, I prefer nginx,但只要适合您即可。

我们的想法是,您将 运行 您的 SBCL 侦听某个本地端口,等待从 Apache 通过管道传入的请求。 Apache 将直接从客户端接收请求,并将其中一些请求传递给您的 Web 应用程序(大概,您希望外部服务器为您处理静态资产)。