0

Possible Duplicate:
running nginx as a reverse proxy with apache

how to install nginx as reverse proxy with apache ? in kloxo panel need full tutorial

1
  • Please try to search? This is a duplicate of the first 10 related links to the right. I also know you were shown a big red warning of possible duplicates when you asked this.
    – hobodave
    Feb 25, 2011 at 5:22

1 Answer 1

1

You need use ssh to install nginx.

  1. Enable EPEL:

    rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/$(uname -m)/epel-release-5-3.noarch.rpm

  2. Install nginx:

    yum install nginx

  3. Change Listen in Apache2:

    Listen 127.0.0.1:80

  4. Configure nginx:

example:

 server {
    listen IP:80;
    server_name example.com www.example.com;

    location / {
        proxy_pass http://127.0.0.1:80/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    location ~* \.(jpg|gif|png|css|js)$ {
    root /var/www/example.com/;
    }
 }
1
  • tried domain not working
    – onel0ve
    Feb 27, 2011 at 4:23

Not the answer you're looking for? Browse other questions tagged .