We have an ec2 instance in AWS cloud running on amazon AMI and plan to deploy a web application (medium scale app).
1.Nginx as reverse proxy server with Apache.
2.Pure nginx with php-fpm without Apache.
Which one is better for a scalable application? in terms of both security and performance?
Suppose if we choose the first method do we need a separate server? One for nginx(proxy server) and one for apache (Application server).