私はすでにmod_pythonをインストールしましたが、それを使おうとすると:
例えば。
>>>import mod_python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mod_python
-
[root@lab6 /]# yum install mod_python
Loaded plugins: rhnplugin, security
Setting up Install Process
Package mod_python-3.2.8-3.1.x86_64 already installed and latest version
Nothing to do
すでにRedhatサーバーにインストールしているのにインポートできません。
そして、このhttpd.confエントリを使用してRedhatサーバーにDjangoをデプロイするために使用されると思われます。
<VirtualHost mritest2.domain.ch:80>
ServerName mritest2.domain.ch
DocumentRoot /home/django_www/hardi
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mri.settings
PythonDebug On
PythonPath "['/home/django_www', '/home/django_www/hardi'] + sys.path"
</Location>
<Location "/static/">
SetHandler None
</Location>
</VirtualHost>