Coder Social home page Coder Social logo

tubbz-alt / bouncer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alphagov/bouncer

0.0 1.0 0.0 683 KB

Handles traffic for sites that have transitioned to GOV.UK

Home Page: https://docs.publishing.service.gov.uk/apps/bouncer.html

License: MIT License

Ruby 90.04% Shell 0.07% CSS 5.88% JavaScript 0.36% HTML 3.64%

bouncer's Introduction

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.

bouncer's People

Contributors

jamiecobbett avatar tomstuart avatar rgarner avatar dependabot-preview[bot] avatar jennyd avatar dependabot-support avatar thomasleese avatar cbaines avatar murilodalri avatar issyl0 avatar h-lame avatar sihugh avatar tijmenb avatar barrucadu avatar benthorner avatar chrisbashton avatar dependabot[bot] avatar 1pretz1 avatar tomsabin avatar alangabbianelli avatar kevindew avatar heathd avatar tommyp avatar benbaumann95 avatar edwardkerry avatar bradwright avatar alexmuller avatar koetsier avatar mnowster avatar benilovj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.