Git Product home page Git Product logo

mod_rpaf's Introduction

mod_rpaf-fork - reverse proxy add forward

Summary

Apache-2.2 module for reverse proxy forked from mod_rpaf-0.6.
Set REMOTE_ADDR, HTTPS, and HTTP_PORT from upstream proxy environment variables.

What is the difference from original mod_rpaf-0.6.

  • Feature: Add directive RPAFsethttps. It's compatible with AWS ELB.
  • Feature: Add directive RPAFsetport.
  • Feature: Support for partial IP address as '192.168.' for RPAFproxy_ips.
  • Bugfix: In the case of APR_HAVE_IPV6-enabled build, access control of Order/Allow/Deny does not work correctly.
  • Support of httpd 1.3 was deleted.

Install with rpm package for RedHat/CentOS 6.x

yum localinstall http://y-ken.github.com/package/centos/6/x86_64/mod_rpaf-fork-0.6-5.el6.x86_64.rpm

Compile and Install for RedHat/CentOS

yum install httpd-devel
apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c

or simply try:

yum install httpd-devel
make
make install

Compile Debian/Ubuntu Package and Install

sudo apt-get install build-essential apache2-threaded-dev yada
dpkg-buildpackage -b
sudo dpkg -i ../libapache2-mod-rpaf_X.X-X.X_XXX.deb

Configuration Directives

RPAFenable      (On|Off)           - Enable reverse proxy add forward

RPAFproxy_ips   192.168. 10.0.0.   - What IPs to adjust requests for.

RPAFheader      X-Forwarded-For    - The header to use for the real IP address.

RPAFsetHostname (On|Off)           - Update vhost name so ServerName & ServerAlias work

RPAFsethttps    (On|Off)           - Set the HTTPS environment variable to the header value 
                                     contained in X-HTTPS, or X-Forwarded-HTTPS. (experimental)
                                     Also work with X-Forwarded-Proto value were https.

RPAFsetport     (On|Off)           - Set the server port to the header value 
                                     contained in X-Port, or X-Forwarded-Port.

Note: The option of RPAFsetport has limitation. It only work for one virtualhost on localhost:80, and you only send requests like X-Forwarded-Port: 443.
Do not use this option for the regular multi domain hosted server due to current Apache architecture.

Example Configuration

LoadModule       rpaf_module modules/mod_rpaf-2.0.so
RPAFenable       On
RPAFproxy_ips    192.168. 10.0.0.
RPAFheader       X-Forwarded-For
RPAFsetHostname  Off
RPAFsethttps     Off
RPAFsetport      Off

Authors

License and distribution

This software is licensed under the Apache License 2.0. The latest version is available from GitHub

Footnote

It is forked following projects.

Appendix

Patch is available for Apache 2.4+ http://blog.77jp.net/mod_rpaf-install-apache-2-4

mod_rpaf's People

Contributors

y-ken avatar

Watchers

 avatar  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.