Can I use the same Nginx installation as a reverse proxy (for apache+mod_wsgi) and use it to serve static content and PHP over a single IP address at the same time?
-
I would try to ask this question on stackoverflow.com. There it's all about servers. I have a few questions on the subject.– Saif BechanAug 19, 2011 at 5:05
-
You but you would need to run apache on a different port (ex 81) and forward traffic from nginx to apache on port 81. Plenty of info on the nginx site how to do that.– Yavor ShahpasovAug 19, 2011 at 18:54
Add a comment
|
2 Answers
Yes, you can use one nginx instance to serve both static content, dynamic content (by proxying to an FCGI or backend HTTP app server) and a reverse proxy. The configuration is straightforward and covered by the excellent documentation and examples available from http://wiki.nginx.org/.
Using different listen ports and redirecting incoming connections (for e. g., with firewall) properly.
-
Is it possible with a single instance of nginx only listening on port 80?– abargAug 19, 2011 at 3:51
-
-
What I meant was a single process, sorry. Actually multiple processes would be fine, but all requests need to come from port 80– abargAug 19, 2011 at 4:39
-
— Well, in conclusion: there's nothing unusual in the scheme of nginx usage you had asked about.– poigeAug 19, 2011 at 5:17