我正在根据这些说明设置CKAN,一个挂架应用程序: http ://packages.python.org/ckan/deployment.html
但是,当我指向服务器(没有DNS设置),使用IP或主机名,我只看到Apache的问候页面,sugesting ckan应用程序没有被加载。
这里是我的mod_wsgi脚本:
import os instance_dir = '/home/flavio/var/srvc/ckan.emap.fgv.br' config_file = 'ckan.emap.fgv.br.ini' pyenv_bin_dir = os.path.join(instance_dir, 'pyenv', 'bin') activate_this = os.path.join(pyenv_bin_dir, 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) from paste.deploy import loadapp config_filepath = os.path.join(instance_dir, config_file) from paste.script.util.logging_config import fileConfig fileConfig(config_filepath) application = loadapp('config:%s' % config_filepath)
这里是我的虚拟主机configuration:
<VirtualHost *:80> ServerName dck093 ServerAlias dck093 WSGIScriptAlias / /home/flavio/var/srvc/ckan.emap.fgv.br/pyenv/bin/ckan.emap.fgv.br.py # pass authorization info on (needed for rest api) WSGIPassAuthorization On ErrorLog /var/log/apache2/ckan.emap.fgv.br.error.log CustomLog /var/log/apache2/ckan.emap.fgv.br.custom.log combined <Directory /home/flavio/var/srvc/ckan.emap.fgv.br/pyenv/bin> Order deny,allow Allow from all </Directory> </VirtualHost>
我尝试禁用000默认站点(与a2dissite),但没有什么帮助。这样做后,我得到一个内部服务器错误页面,但没有日志消息。 任何人都可以指出我错过了什么?
如果您使用IP访问服务器,则应使用您正在使用的IP的ServerName或ServerAlias ,否则将不加载虚拟主机。
我发现Pylons的debuggingfunction不支持apache mod_wsgi的默认多进程configuration。
请参阅: https : //stackoverflow.com/questions/5485790/mod-wsgi-pylons-ckan-installation-not-working
更多细节。