how to setup two project in nginx ?

July 22, 2019 142 views
Nginx Ubuntu 18.04

hello guys :

i have one vps for two site .

imaging i have , i want when user enter this route open wordpress and in this route open django project ,
how i configure that ?

2 Answers
bobbyiliev MOD July 22, 2019
Accepted Answer


You could use a reverse proxy to do that.

So in your server block you could add something like this:

location ~/page1(.*)$ {
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;

Hope that this helps!

thank you bro

Have another answer? Share your knowledge.