使用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>