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
