Ask Your Question
1

askbot gunicorn 404 error

asked 2013-01-06 03:16:07 -0500

jerry_gzy gravatar image

updated 2013-01-06 06:29:58 -0500

INSTALLED_APPS = ( ... "gunicorn", )

then run

python manage.py run_gunicorn

error as follows

 >python manage.py run_gunicorn 0.0.0.0:8000

2013-01-06 06:25:06 [16815] [INFO] Starting gunicorn 0.17.1
2013-01-06 06:25:06 [16815] [INFO] Listening at: http://0.0.0.0:8000 (16815)
2013-01-06 06:25:06 [16815] [INFO] Using worker: sync
2013-01-06 06:25:06 [16820] [INFO] Booting worker with pid: 16820
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

/home/ubuntu/.virtualenvs/web/local/lib/python2.7/site-packages/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.Loader
  warnings.warn('Cannot translate loader: %s' % loader)
edit retag flag offensive close merge delete

Comments

I'm having the same problems; does anyone know how to fix it?

kate_r gravatar imagekate_r ( 2013-05-14 09:57:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-06 08:22:09 -0500

jerry_gzy gravatar image

i am not so sure this is the answer, but give it a try

there is a stackoverflow post regarding gunicorn serving statics

http://stackoverflow.com/questions/10862259/can-django-run-on-gunicorn-alone-no-apache-or-nginx

it says:

urlpatterns = patterns('',
# ... the rest of your URLconf goes here ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

and the askbot code says

10 
11 urlpatterns = patterns('',
12     (r'%s' % settings.ASKBOT_URL, include('askbot.urls')),
13     (r'^admin/', include(admin.site.urls)),
14     #(r'^cache/', include('keyedcache.urls')), - broken views disable for now
15     (r'^settings/', include('askbot.deps.livesettings.urls')),16     (r'^followit/', include('followit.urls')),
17     (r'^robots.txt$', include('robots.urls')),
18     url( # TODO: replace with django.conf.urls.static ?
19         r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
20         'django.views.static.serve',
21         {'document_root': settings.MEDIA_ROOT.replace('\\','/')},
22     ),
23 ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
24

I am not a develper of askbot but the TODO there looks like some thing related. please let me know if my guess is on the spot, thx.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-01-06 03:16:07 -0500

Seen: 506 times

Last updated: Jan 06 '13