Code Monkey home page Code Monkey logo

mod-proxy-protocol's Introduction

Apache Proxy Protocol Module

This is an Apache module that implements the server side of HAProxy's Proxy Protocol.

Build and Install

You'll need the apache development packages installed (typically something like apache-devel or apache2-dev). Then simply running make will create the shared library in .libs/mod_proxy_protocol.so; make install will attempt to install it in your current apache installation (you'll probably need to be root for this).

Configuration

Add the following directive to your apache config to load the module

LoadModule proxy_protocol_module <path-to-module>/mod_proxy_protocol.so

or try running

apxs -a mod_proxy_protocol.c

For configuration details see the module docs

Amazon EC2 Notes

To properly secure Apache when using this on EC2 behind an ELB you'll probably want to do something like the following to ensure that only the ELB can provide the proxy protocol header while still being able to access the site directly (not via the ELB):

  1. In Apache create a copy of virtual host with a new port, and add the 'ProxyProtocol On' directive to this new virtual host.
  2. Add an entry to the security group for the server that only allows access to this new port from the ELB (specify the source as amazon-elb/amazon-elb-sg)
  3. Point the ELB listener at this new port (and of course enable the proxy protocol for that)

TODO

  • Add access-control (see commented out ProxyProtocolTrustedProxies in mod_proxy_protocol.xml)
  • Add support for outgoing connections (mod_proxy)

mod-proxy-protocol's People

Contributors

roadrunner2 avatar

Watchers

Tiemo avatar Sander Hoentjen avatar James Cloos 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.