Results 1 to 4 of 4
  1. #1

    Using Nginx and Apache together


    I have a lot of PHP sites running on a server with Apache.

    Now, I am just about to launch my first Django site.

    I have successfully got WSGI working with Apache and want to use Nginx to serve my static content.

    I have set Apache to listen on port 8080 and Nginx on port 80.
    Requests to my media URL are being served with Nginx and the Python files are being forwarded to Apache on port 8080, going through WSGI.

    What I want to know is, is there a simple way to keep all of my old sites going through Apache or do I need to create separate records in Nginx for each of my sites to forward them through to port 8080?

    I hope that makes sense (I'm quite new to this)!

    Any advice appreciated.


  2. #2
    Join Date
    Mar 2009
    proxy_pass everything else and install rpaf on apache

  3. #3
    Join Date
    Mar 2010
    You can setup vhosts for specific domains in nginx virtual hosts configuration file for this purpose . Pass those websites directly to apache's port and let the rest be processed and proxied .
    You should place these specific lines above the rest of the virtual host lines in case you're using a wild card vhost .
    I Think that should make it work .

  4. #4
    Could you give me an example of this 'catch all' process? (sorry i'm new to nginx).
    Presumably I need to add something to /etc/sites-available/default rather than a specific domain?

Similar Threads

  1. Apache or nginx
    By Awwent in forum Hosting Security and Technology
    Replies: 3
    Last Post: 04-15-2011, 06:51 AM
    By huli in forum Web Hosting
    Replies: 6
    Last Post: 01-17-2011, 05:47 AM
  3. Apache or nginx ? now : Danginx
    By mixmox in forum Hosting Security and Technology
    Replies: 7
    Last Post: 11-06-2010, 12:28 PM
  4. Apache vs lighttpd vs nginx
    By ryan14 in forum Hosting Security and Technology
    Replies: 18
    Last Post: 08-27-2009, 10:33 PM
  5. nginx works with apache, but...
    By surfmanjoe in forum Hosting Security and Technology
    Replies: 1
    Last Post: 08-14-2008, 12:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts