用django+mod_wsgi
在根目录下建立test文件夹,test文件夹里建立project文件夹mysite,test文件夹里添加了配置文件.htaccess和django.wsgi,如下:
[.htaccess]:
AddHandler wsgi-script .wsgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ django.wsgi/$1 [QSA,L]
[django.wsgi]:
import os, sys
sys.path.append(r'/www/dzhaoo01/test/')
sys.path.append(r'/www/dzhaoo01/test/mysite/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
但进入http://dzhaoo01.dearc16.deardns.com/test/ 出现500错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@
localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.20 (CentOS) Server at
dzhaoo01.dearc16.deardns.com Port 80
因为看不到server log error,希望大家能帮忙看下大概是什么问题
我是新手,如果有描述不清楚的,请提问。