0

I have an existing server running a domain using apache. (php)

Now we have another domain we're trying to run on that same server that we want to run using nginx and uwsgi (python). Also should I run this python project from virtualenv?

Is it even possible to do? Port 80 is already being used by apache. Trying to wrap my head around all this.

Thank you!

Tee

teepusink
  • 121
  • 3

1 Answers1

1

You can:

  • leave apache as it is and bind nginx on another port, for example 8080 (this is lame, still some people are doing this because it's the simpliest thing).
  • make apache listen on 127.0.0.0:8080 instead, setup nginx, create one virtualhost for apache installation, and proxy all the requests, and one for uwsgi (still lame, but less lame than previous and thus acceptable)
  • throw out apache at all, start using php-fpm, make two virtual hosts - one for php-fpm serving your php installation, and one for uwsgi. That's what I'd do.

And no, based on all that you are describing you should definitely not run nginx and uwsgi in a virtual environment.

drookie
  • 8,625
  • 1
  • 19
  • 29
  • Hi @drookie, thanks for the answer. So just to confirm on the 3rd option. Does the 3rd option not use nginx at all? Is 2nd option basically the one where we use nginx reverse proxy? Thx! – teepusink Sep 29 '15 at 19:45