使用 mod_python ,我想知道为什么我必须创建 PythonHandler 才能获得解析Python代码的URL。如果您在下面看到,如果我没有名为jrpython.py的文件,它将无法正常工作。
有没有办法让我的所有.py 文件只运行而不是每次都添加?
<VirtualHost *:80>
DocumentRoot /var/www/vhost/testsite.com
ServerName www.testsite.com
<Directory "/var/www/vhost/testsite.com">
AddHandler mod_python .py
PythonHandler jrpython
PythonDebug On
Options FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow From All
</Directory>
</VirtualHost>