I'm considering using 2 virtual servers, 1 running Apache facing the internet (e.g. www.example.com) running over https and other running ngnix on a private ip connecting to the main server to serve static content e.g. /data (css, PDF's, etc). The machines will both be hosted in a VM environment both running on the same network.

My questions is how feasible is this to set up and is it even feasible? Also is it a good idea to do it this way as I know nginx is better at serving static content and as its on a different server then its scalable for performance and space.

Does this make sense or is a good idea?

link|improve this question

67% accept rate
It is very possible that you will not see a performance difference between the 2 :) It all depends on how you configure your apache/nginx... In the end, I think virtualizing is a great idea. – Clustermagnet Jan 12 at 18:12
email me, vasiliy@clustermagnet.com if you need help setting this up :) – Clustermagnet Jan 12 at 18:14
@clustermagnet thanks for that – Grimlockz Jan 13 at 9:31
feedback

1 Answer

up vote 0 down vote accepted

It is feasible to setup but you would be better having nginx on the public facing server, even if you have apache on this also have nginx first which proxys to apache and you can then proxy to the one with the private ip for the static content.

link|improve this answer
Would it be best to have apache then proxy to nginx? – Grimlockz Jan 13 at 9:32
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.