python - What's wrong with the Basic configuration of apache and mod_python? -


the basic configuration of apache is:

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> 

i have done:

ln -sf /usr/local/gdnsplus_conf/www/mysite /var/www/html/gdnsplus_conf 

the version of django is:1.4.5
version of mod_python is:3.3.1
directory of of django app is: /usr/local/gdnsplus_conf/www/mysite
context of app is:

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 

the infomation of urls.py is:

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), 

the question is:

http://192.168.23.73/ns_list/ 

is not work.the wrong message "file not exist" apache log.

how solve ? thank you.

you should accessing @ http://192.168.23.73/mysite/ns_list/ stated rohan in comments.

this because in apache configuration have <location "/mysite/">

you can read more location directive here. docs:

in example below, trailing slash used, requests /private2/ , /private2/file.txt have enclosed directives applied, /private2 , /private2other not.

<location /private2/>     # ... </location> 

it's worth noting mod_python no longer under active development , should @ using modwsgi instead.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -