在Apache2 mod-python中使PSP和Publisher处理程序协同工作

1 投票
1 回答
990 浏览
提问于 2025-04-16 05:00

我刚刚在apache2上成功运行了mod-python,第一次玩弄PSP和Publisher处理器。我通过在Ubuntu的/etc/apache2/sites-available/default文件中添加以下内容来实现:

AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On

或者

AddHandler mod_python .psp
PythonHandler mod_python.psp
PythonDebug On

但是我尝试把这两个都放进去,结果没成功。现在我需要让PSP和Publisher一起工作。

还有其他的建议吗?有没有人知道支持高亮显示的文本编辑器?最好是有代码补全功能的IDE。

1 个回答

3

这个对我来说有效:

<Directory /var/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        AddHandler mod_python .py
        PythonHandler mod_python.publisher | .py
        AddHandler mod_python .psp .psp_
        PythonHandler mod_python.psp | .psp .psp_
        PythonDebug On
</Directory>

想了解更多细节,可以查看手册:http://www.modpython.org/live/current/doc-html/dir-handlers-syn.html

撰写回答