I want to serve multiple django projects (actually django rest API apps) On one domain but serve each of them on seperated url. like this:
- http://test.com/app1/...
- http://test.com/app2/...
and so on. I will be using nginx to config it. But i'm facing some problems that wants your helps:
- These apps should have different cookie for each other. cause they have different auth system. so token and cookie in one is not valid for another. How to handle this?
- What nginx configs you recommend.
Note:
I don't want full detail cause i know concepts. just some hints and usefull commands will do.
Update:
For example i have a django app which has a url test
. and i want this path to be served on server with /app1/test
. The problem is that when is send request to /app1/test
, Django doesn't recognize it as /test
, instead as /app1/test
and because /app1
is not registered in urls.py will give 404 error.
here is a sample of my nginx config:
server {
listen 80;
server_name test.com;
location /qpp1/ {
include uwsgi_params;
proxy_pass http://unix://home//app1.sock;
}
location /qpp2/ {
include uwsgi_params;
proxy_pass http://unix://home//app2.sock;
}
}