了Apache的基本配置为:apache和mod_python的基本配置有什么问题?
LoadModule python_module /usr/lib64/httpd/modules/mod_python.so
<Location "/mysite/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonDebug On
PythonPath "['/var/www/html', '/usr/local/gdnsplus_conf/www/mysite'] + sys.path"
</Location>
我做:
ln -sf /usr/local/gdnsplus_conf/www/mysite /var/www/html/gdnsplus_conf
的Django的版本:1.4.5
mod_python的版本是:3.3.1
django应用程序的目录是:/ usr/local/gdnsplus_conf/www/mysite
应用程序的上下文是:
ll /usr/local/gdnsplus_conf/www/mysite
total 184
-rw-r--r-- 1 apache root 2970 Mar 25 16:20 conf.xml
-rw-r--r-- 1 apache root 4992 Apr 25 17:15 cv
-rw-r--r-- 1 apache root 4991 Apr 25 17:16 cv_all
-rw-r--r-- 1 apache root 6727 Mar 29 18:05 hand_xml.py
-rw-r--r-- 1 apache root 0 Mar 12 09:12 __init__.py
-rw-r--r-- 1 apache root 134 Mar 12 09:15 __init__.pyc
-rw-r--r-- 1 apache root 5720 Apr 17 15:27 settings.py
-rw-r--r-- 1 apache root 5400 Mar 12 09:33 settings.py.bk
-rw-r--r-- 1 apache root 3118 Apr 17 15:27 settings.pyc
-rw-r--r-- 1 apache root 2080 Apr 22 13:34 tags
drwxr-xr-x 2 apache root 4096 May 9 13:46 templates
-rw-r--r-- 1 apache root 62 Apr 27 11:05 test
-rw-r--r-- 1 apache root 1238 May 9 11:09 urls.py
-rw-r--r-- 1 apache root 1144 May 9 11:10 urls.pyc
-rw-r--r-- 1 apache root 34352 May 9 13:45 views.py
-rw-r--r-- 1 apache root 30384 Apr 16 09:06 views.py.bk
-rw-r--r-- 1 apache root 33425 May 9 14:55 views.pyc
-rw-r--r-- 1 apache root 1134 Mar 12 09:12 wsgi.py
-rw-r--r-- 1 apache root 1028 Mar 12 09:15 wsgi.pyc
urls.py的信息来源是:
urlpatterns = patterns('',
(r'^conf_xml/$', receive),
(r'^dc_list/$', listall),
(r'^show_err/$', show_err),
(r'^ipdb_file/$', ipdb_file),
(r'^ipdb_update/$', ipdb_update),
(r'^task_list/$', task_list),
(r'^task_search/$', task_search),
(r'^nip_set/$', nip_set),
(r'^nip_del/$', nip_del),
(r'^nip_update/$', nip_update),
(r'^ns_set/$', ns_set),
(r'^ns_list/$', ns_list),
(r'^reversion_list/$', list_version),
(r'^version_set/$', version_set),
(r'^index/$', all_err),
(r'^machine/$', show_machine),
的问题是:
http://192.168.23.73/ns_list/
不work.The错误消息从Apache日志 “文件不存在”。
如何解决?谢谢。
不应该以'http:// 192.168.23.73/mysite/ns_list /'的身份访问吗? – Rohan 2013-05-10 06:42:38
@Rohan PythonOption django.root/mysite所以,不需要mysite – lxgeek 2013-05-10 06:57:34