asked 2012-07-22 13:02:31 -0500
This post is a wiki. Anyone with karma >100 is welcome to improve it.
Has anyone successfully served askbot from a subpath using nginx with uwsgi or gunicorn.
Main site: www.example.com Will have link to askbot forum: www.example.com/ask
On nginx trying to capture this seperately by doing
location /ask/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^/ask/(.*)$ /$1 break;
proxy_pass http://askbot; #askbot is an upstream hook either gunicorn or uwsgi
proxy_redirect http://askbot/ $scheme://$host/ask/;
No success. Tried other approaches, uwsgi SCRIPT_NAME cofiguration, etc... The closet one found was using nginx as a proxy and serving askbot from apache. Obviously, I'd like to have just nginx running and not have both apache and nginx running.
Why run from a subpath. Simple the main site will have links to other facets of the website. I don't it to be incorporated into the main site which are either django projects or other framework. Bottom line: it would be nice to be able to deploy separate from non-root location.
answered 2012-07-22 13:47:47 -0500
This post is a wiki. Anyone with karma >100 is welcome to improve it.
Try using FORCE_SCRIPT_NAME valiable in the settings.py file.
This commit in Django supposedly fixed the issue back in 2008.
There is a more hackish workaround described in this blog post and a stackoverflow answer.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2012-07-22 13:02:31 -0500
Seen: 237 times
Last updated: Jul 22 '12
Do I need to configure an upfiles/ directory?
mutliple instance of askbot in differents directories on the same virtual host ?
Can someone update the deployment documentation?
How to Step by Step Deploy Askbot uWSGI Nginx on CentOS 6 64bit?
How can i run multiple instances of askbot on a server?
can I run askbot on tornado instead of django
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.