Skip to content

Instantly share code, notes, and snippets.

@jameskyle
Created April 28, 2014 19:17
Show Gist options
  • Select an option

  • Save jameskyle/11381440 to your computer and use it in GitHub Desktop.

Select an option

Save jameskyle/11381440 to your computer and use it in GitHub Desktop.
FROM ubuntu:latest
MAINTAINER James Kyle "james@jameskyle.org"
RUN apt-get update -qq && apt-get -y install nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
ADD default /etc/nginx/sites-available/default
EXPOSE 80
CMD ["nginx"]
=========== default config file===============
upstream roadrage {
server address:port;
}
server {
location /roadrage {
rewrite /roadrage/(.*) /$1 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://roadrage;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment