serve askbot on nginx with uwsgi or gunicorn from subpath
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.
Comments