我有,这个 httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.hello2.ch
DocumentRoot /home/django_www/hello
WSGIScriptAlias / /var/www/django_www/hardi/django.wsgi
ErrorLog /var/www/django_www/hardi/error_log
CustomLog /var/www/django_www/hardi/access_log common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/html
</VirtualHost>
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
128.178.131.89 www.hello2.ch
128.178.131.89 ohtersite.ch
python 2.5,mod_wsgi-2.5,/root/epd-5.1.0/lib/libpython2.5.so.1.0:安装!
ldd /root/epd-5.1.0/bin/python
libpython2.5.so.1.0 => /root/epd-5.1.0/lib/libpython2.5.so.1.0 (0x00002b1bb7333000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003da0600000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003d9fe00000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003dadc00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003da0200000)
libc.so.6 => /lib64/libc.so.6 (0x0000003d9fa00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d9f600000)
回声 $LD_LIBRARY_PATH
/root/epd-5.1.0/lib/
但是当我尝试加载网页时,我得到以下error_log:
'import site' failed; use -v for traceback
[Wed Aug 29 11:52:57 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Aug 29 11:52:57 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Aug 29 11:52:57 2012] [notice] Digest: done
[Wed Aug 29 11:52:57 2012] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed Aug 29 11:52:57 2012] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Wed Aug 29 11:55:00 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 11:58:30 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 12:01:58 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 12:05:30 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 12:09:00 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 12:12:29 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 12:14:06 2012] [error] [client 178.33.137.225] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
[Wed Aug 29 12:15:59 2012] [error] [client 66.249.72.187] Symbolic link not allowed or link target not accessible: /var/www/html/app/webroot/w3
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
....
'import site' failed; use -v for traceback
[Wed Aug 29 12:17:47 2012] [notice] caught SIGTERM, shutting down
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
[Wed Aug 29 12:17:47 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Aug 29 12:17:47 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Aug 29 12:17:47 2012] [notice] Digest: done
[Wed Aug 29 12:17:47 2012] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed Aug 29 12:17:47 2012] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Wed Aug 29 12:18:01 2012] [error] Traceback (most recent call last):
[Wed Aug 29 12:18:01 2012] [error] File "/var/www/django_www/hardi/django.wsgi", line 1, in <module>
[Wed Aug 29 12:18:01 2012] [error] import os
[Wed Aug 29 12:18:01 2012] [error] ImportError: No module named os
任何想法,如何使 Django 与 mod_wsgi 一起工作,以及如何使第一个 VirtualHost 条目与 www.hello2.ch 网页以及第二个 VirtualHost 条目中的所有其他条目相匹配?