Revision history [back]
In the nginx config the key is to connect the base url to the upstream server (other parameters - the same as usual):
location /subdir/ {
uwsgi_pass unix:///var/uwsgi/mysite.sock; # using a Unix socket here, as one of the options
include uwsgi_params;
}
In the settings.py file:
ASKBOT_URL = 'subdir/' # without the leading slash
# If uploaded files urls and media also need to be custom
# adjust parameters `MEDIA_URL` and `STATIC_URL` to be the same as locations
# in the nginx config.
The above is sufficient for me with the uwsgi upstream Python app server, with Django 1.8.
If you are using mod_wsgi
- FORCE_SCRIPT_NAME
might need to be set in the settings.py
- I haven't tested, but it should be similar to ASKBOT_URL
value, give or take the slashes. This might also be needed for other Python app servers, including uwsgi
- I haven't tested older versions.
In the nginx config the key is to connect the base url to the upstream server (other parameters - the same as usual):
location /subdir/ {
uwsgi_pass unix:///var/uwsgi/mysite.sock; # using a Unix socket here, as one of the options
include uwsgi_params;
}
In the settings.py file:
ASKBOT_URL = 'subdir/' # without the leading slash
# If uploaded files urls and media also need to be custom
# adjust parameters `MEDIA_URL` and `STATIC_URL` to be the same as locations
# in the nginx config.
The above is sufficient for me with the uwsgi upstream Python app server, with Django 1.8.
If you are using mod_wsgi
- FORCE_SCRIPT_NAME
might need to be set in the settings.py
- I haven't tested, but it should be similar to ASKBOT_URL
value, give or take the slashes. This might also be needed for other Python app servers, including uwsgi
- I haven't tested older versions.
In the nginx config the key is to connect the base url to the upstream server (other parameters - the same as usual):
location /subdir/ {
uwsgi_pass unix:///var/uwsgi/mysite.sock; # using a Unix socket here, as one of the options
include uwsgi_params;
}
In the settings.py file:
ASKBOT_URL = 'subdir/' # without the leading slash
# If uploaded files urls and media also need to be custom
# adjust parameters `MEDIA_URL` and `STATIC_URL` to be the same as locations
# in the nginx config.
The above sufficient for me with the uwsgi upstream Python app server, with Django 1.8.
If you are using mod_wsgi
- FORCE_SCRIPT_NAME
might need to be set in the settings.py
- I haven't tested, but it should be similar to ASKBOT_URL
value, give or take the slashes. This might also be needed for other Python app servers, including slashes.uwsgi
- I haven't tested older versions.