gpt4 book ai didi

apache - linux+apache2+mod_lisp+CLISP 重访

转载 作者:太空宇宙 更新时间:2023-11-03 19:02:17 24 4
gpt4 key购买 nike

尝试遵循上一个问题的指南 Apache + mod_lisp + clisp

CLISP 已安装并成功运行:

(加载“modlisp-clisp”)(modlisp:modlisp-server)运行正常,即无休止

Python 通过本地主机在/usr/lib/cgi-bin 之外工作正常

试图让 clisp 服务器在/var/www/html/lsp 之外工作

通过 localhost/lsp 打印的浏览器访问:mod_lisp 2.0这是mod_lisp 2.0 + CLISP + apache + Linux发送的常量html字符串

但是 localhost/lsp/test.lisp 只返回内部服务器错误(chmod 777 test.lisp 完成)

clisp 解释器中的 test.lisp 没有出现名称为“content-type”的包:

(defun xyz()
(format t 'Content-Type: text/html;charset=utf-8')
(print())
(print())
(print(coerce '(#\u2211) 'string))
(print(coerce '(#\U20AC) 'string))
(format t "hello world!")
)
(xyz)

详细信息:uname -aLinux me-H97N-WIFI 3.13.0-37-generic#64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

apache2ctl -MAH00558:apache2:无法可靠地确定服务器的完全限定域名,使用 127.0.1.1。全局设置“ServerName”指令以抑制此消息加载的模块:...lisp_module(共享)..

/etc/apache2/sites-enables/000-default.conf:

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ScriptAlias/cgi-bin//usr/lib/cgi-bin/

允许覆盖无选项 +ExecCGI -MultiViews +SymLinksIfOwnerMatch订单允许、拒绝允许所有

(我的 LISP 修改:)

位置/var/www/html/lsp> SetHandler lisp 处理程序位置>

/etc/apache2/mods-enabled/lisp.conf:

LispServer 127.0.0.1 3000 "/var/www/html/lsp"

我哪里做错了?lisp 服务器是否应该以某种方式与 python 一起在 cgi-bin 之外运行?我如何发送 html header ?

最佳答案

'

不是有效的字符串定界符。这是 quote operator ,这会导致它标记的表单未被评估,因此您可以调用对这些表单本身进行操作的函数。

尝试用双引号替换单引号,这将导致它被读取为字符串。

(format t "Content-Type: text/html;charset=utf-8")

关于apache - linux+apache2+mod_lisp+CLISP 重访,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27672625/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com