Add comment

Jan 29 2008
User: cedric
Category: Techno
Tags: nginx server proxy apache

nginx proxy conf for apache

My main website (feelfree.homelinux.com) is running Ruby On Rails with Thin and other apps like gallery2 running on port 8080 of Apache.

Here’s the simple config of the proxy server for nginx to route correctly all requests to my php+apache gallery: (to be written in /etc/nginx/nginx.conf)

  server {
    listen 80;
    server_name my.website.name;

    location / {
      proxy_pass      http://127.0.0.1:8080;
      set  $dest  $http_destination;
      if ($http_destination ~ "^https://(.+)") {
        set  $dest   http://$1;
      }
      proxy_set_header  Destination   $dest;
    } 
  }

comments : 0 Add comment




Back
Log in

Quick links

Localization

Search

weather


  • metric us

gallery

Last comments

Categories

  • categories

nabaztag

  • message

    left
    right
    voice
    speed
    pitch

hcard