Skip to content

rcukmuratom/bouncer

 
 

Repository files navigation

bouncer

This is a Rack-based redirector. It serves 301s and 410s from mappings created by Transition.

Testing in a browser in development

These instructions assume you use the Dev VM, that Bouncer is running, and that you have some data in your Transition/Bouncer database.

Let's say you want to test bis.gov.uk.

Get the IP address of your VM:

mac$ ping transition.dev.gov.uk

Then, add to hosts file on your Mac:

mac$ cat /etc/hosts
10.1.1.254 dev.bis.gov.uk

Then on your VM, as root, add this file:

dev$ cat /etc/nginx/sites-available/bis.gov.uk
server {
  server_name dev.bis.gov.uk;
  listen 80;

  location / {
    proxy_pass http://bouncer.dev.gov.uk-proxy;
    proxy_set_header Host bis.gov.uk;
  }
}

Then link the file:

dev$ sudo ln -s /etc/nginx/sites-available/bis.gov.uk /etc/nginx/sites-enabled/bis.gov.uk

And restart nginx:

dev$ sudo service nginx restart

Now browse to http://dev.bis.gov.uk/410 and bask in the glory.

About

A Rack-based redirector for sites which have moved to GOV.UK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 65.0%
  • HTML 30.2%
  • CSS 4.3%
  • JavaScript 0.3%
  • Procfile 0.1%
  • Dockerfile 0.1%