Possible running Apache and Nginx VirtualHosts independently on same server. I know they must listen on different ports BUT is it possible to say let Apache independently handle 3 websites while the remaining 5 websites are handled by NGINX ?

And I don't mean Reverse proxying.

Also in the past when I made either Apache or Nginx listen on different port e.g 419, had to add it to url e.g http://example.com:419

Anyway to avoid having to add this to url ?

Also is Apache + NGINX as reverse proxy as fast and similar memonry footprint as only Nginx + PHP-FPM ?

1 Answer 1


http:// implies port 80 unless another port is specified. https:// implies port 443 unless another port is specified.

If you don’t want to specify a port, you’re only option is to have one server reverse proxy the other.

Can’t speak to performance or resource usage.

  • 1
    I think it would be helpful to mention that the HTTP/HTTPS port is only available to one server because only one process can bind to it at the OS level.
    – Haxiel
    Commented Oct 26, 2020 at 4:06
  • Ok. Want to know if it's often worth it Reverse proxying NGINX with Apache when Nginx alone can handle all things or are there Security reasons / advantages
    – Kelvin
    Commented Oct 26, 2020 at 7:08
  • Technically, NGINX is so much better in its architecture that in most cases it makes no sense to use Apache at all unless in very rare cases you rely on a functionality that is only available in Apache (highly unlikely). Commented Oct 26, 2020 at 7:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .