My question is how can I use one domain (mydomain.com) to build multiple django server?
This is my nginx.conf,
upstream django_myproject {
server unix:///home/frank/myproject/haunyu.sock; # for a file socket
}
server {
listen 80;
server_name mydomain.com; # This is my ow
charset utf-8;
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/frank/myproject/media;
}
location /static {
alias /home/frank/myproject/static;
}
location / {
uwsgi_pass django_myproject;
include /home/frank/myproject/uwsgi_params; #
uwsgi_read_timeout 600;
}
}
I try to let location "/" replace to location "/first_app" like this
location /frist_app {
uwsgi_pass django_myproject;
include /home/frank/myproject/uwsgi_params; #
uwsgi_read_timeout 600;
}
}
Then I try to type domain/frist_app to browser, I got 404, My uwsgi also has no contact message.