我在http://community.webfaction.com/questions/8400/need-help-for-askbot-installation上遵循指令,在WebFaction服务器上部署了AskBot脚本。我还完成了运行python2.7 manage.py collectstatic,调试设置为false。
当我访问我的网站时,看起来如下图:http://dl.dropbox.com/u/750152/askbot.png
所有CSS&图像渲染消失了。我是否错过了一步?
您尚未创建一个仅静态应用程序来指向您的静态内容。静态内容将由NGINX前端服务器渲染。
这是步骤 -
In the control panel, create a new app
即使用
作为"与静态应用的符号链接"/home/username/webapps/askbot_server/myask/static作为符号路径。
Add the symlink app to your askbot site using '/m' as the URL path.
然后,
edit/home/username/webapps/askbot_server/apache2/conf/httpd.conf将其更改为 -
<Directory /home/username/webapps/askbot_server/htdocs>
AddHandler wsgi-script .py
</Directory>
to
WSGIScriptAlias / /home/username/webapps/askbot_server/myask/django.wsgi
Restart your Apache with /home/username/webapps/askbot_server/apache2/bin/restart
另外,如果您使用posgresql作为数据库,则启用全文搜索,然后运行
python manage.py init_postgresql_full_text_search