運行Django的時我已經在運行Apache的Django當一個問題:錯誤:目標WSGI腳本找不到或無法統計在Apache
的htdocs /博客/應用/主頁/ urls.py:
url(r'^$', 'index', name="h_index"),
url(r'^about/$', 'about', name="h_about"),
url(r'^contact/$', 'contact', name="h_contact"),
url(r'^archive/$', 'archive', name="h_archive"),
的htdocs /博客/ urls.py
(r'^', include('apps.homepage.urls')),
django.wsgi:
import os
import os.path
import sys
sys.path.append('D:/Coding/xampp/htdocs')
sys.path.append('D:/Coding/xampp/htdocs/blog')
os.environ['DJANGO_SETTINGS_MODULE'] = 'blog.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
的httpd.conf:
Alias /static/ "D:/Coding/xampp/htdocs/blog/static/"
WSGIScriptAlias /blog/ "D:/Coding/xampp/htdocs/blog/django.wsgi"
當我運行 「本地主機/博客」
,它的工作。但是,運行「本地主機/博客/約/」或其他,它的錯誤:
[error] [client ::1] Target WSGI script not found or unable to stat: .../htdocs/blog/django.wsgiabout, referer: http://localhost/blog/
WSGI模塊? LoadModule wsgi_module modules/mod_wsgi.so – rocky 2012-02-29 09:44:47