0

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?

2
  • I would try to ask this question on stackoverflow.com. There it's all about servers. I have a few questions on the subject. Aug 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. Aug 19, 2011 at 18:54

2 Answers 2

1

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/.

0

Using different listen ports and redirecting incoming connections (for e. g., with firewall) properly.

4
  • Is it possible with a single instance of nginx only listening on port 80?
    – abarg
    Aug 19, 2011 at 3:51
  • Define what 'single instance of nginx' is? No apache at all, or what?
    – poige
    Aug 19, 2011 at 4:03
  • What I meant was a single process, sorry. Actually multiple processes would be fine, but all requests need to come from port 80
    – abarg
    Aug 19, 2011 at 4:39
  • — Well, in conclusion: there's nothing unusual in the scheme of nginx usage you had asked about.
    – poige
    Aug 19, 2011 at 5:17

You must log in to answer this question.