您好,我在 Django 尝试使用 apache 将其部署在服务器上时遇到问题。出于某种原因,当我将此信息写入我的 httpd.conf 文件时。
<location "/mysite">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonDebug off
PythonPath "['/user/local/src/djcode','/user/local/src/djcode/mysite'] + sys.path"
</Location>
重新启动 apache 时出现此错误。
Syntax error on line 3 of /etc/apache2/httpd.conf:
Invalid command 'PythonHandler', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
有任何想法吗?