0

I have multiple project set

)WebApp_A
Django_A + ReactJs_A

)WebApp_B Django_B + ReactJs_B

For now I am using apache for ReactJS_B and use nginx for Django_A

mydomain.com comes to Apache(ReactJS_A) and then localhost:8000(from ReactJS_A) comes to nginx(DJango_A)

So now I want to install WebApp_B in the same server.

How should I set ?

Plan 1)

Use the same setting and change the port 8000 -> 8001 mydomain2.com comes to Apache(ReactJS_B) and then localhost:8001(from ReactJS_B) comes to nginx(DJango_B)

Plan 2)

Basically, combination of apache and nginx for react and django is not good?? is there any alternative way??

whitebear
  • 755

1 Answers1

0

How should I set this up?

Assuming I am not misunderstanding, there is no reason you couldn't go with plan 1 (though I might be tempted to save a little money on mydomain2.com and just use subdomain.mydomain.com). This is likely the simpler option, overall.

Is there any alternative way?

You could (theoretically) just use a single web server (Apache or Nginx) for e.g. reverse proxying and your React applications, as well as Django installations. Regarding Django specifically, Apache/mod_wsgi are even supported on Windows.

The potential drawback here might be configuring your web server so it would resolve items correctly (since it would essentially be talking to itself). That is, how you used virtual hosts/server blocks, IP address/port combinations and perhaps proxies vs. redirects could all make a notable difference in operation.

Anaksunaman
  • 18,227