0

I'm launching a couple of DJANGO instances under the same url. They all serve files over HTTPS. In order to save money for ssl certificates, I'm launching them under mydomain.com/django1/ , mydomain.com/django2/ etc. The redirection to the correct DJANGO instance is done in NGINX.

My problem is, how should I change the DJANGO urls to match this architecture? Or can it be done in settings.py?

Documentation: urls and FORCE_SCRIPT_NAME do not seem to give a clue, though I don't really understand the latter...

Thanks in advance!

DA

EDIT 1

This is the block from nginx.conf

location /django1/static/ {
    alias full_path_to_static/static/;
}

location /django1 {
    # We use python for this one
    include uwsgi_params;
    uwsgi_buffering off;
    uwsgi_pass unix:full_path_to.socket;
}
DA--
  • 723
  • 1
  • 8
  • 20
  • 4
    SSL certs are free now. https://letsencrypt.org/ – Ross Rogers May 12 '17 at 14:06
  • I believe you don't have to change anything in the settings.py. From the application's perspective the root path / will just be mydomain.com/django1/ instead of mydomain.com – micebrain May 12 '17 at 14:06
  • Despite that letsencrypt is a very good alternative - if you want to stick with this approach, please post your nginx configuration. – dahrens May 12 '17 at 14:09
  • Possible duplicate of [Correct proxy path in nginx.conf](http://stackoverflow.com/questions/15353935/correct-proxy-path-in-nginx-conf) – dahrens May 12 '17 at 17:47

0 Answers0