GithubHelp home page GithubHelp logo

isabella232 / mod-proxy-fcgi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ceph/mod-proxy-fcgi

0.0 0.0 0.0 25 KB

mod_proxy_fcgi for apache 2.2

License: Other

C 97.79% Makefile 1.08% M4 1.13%

mod-proxy-fcgi's Introduction

mod_proxy_fcgi for Apache 2.2 
=============================

Apache 2.4 shipped mod_proxy_fcgi as part of the core distribution. This git
repository provides a modified version backported to work with Apache 2.2 in
order to work on older distributions (eg. Red Hat Enterprise Linux 6).

Installing from EPEL
====================

If you are on RHEL 6 or derivatives (eg. CentOS 6), you can install a pre-built
version of this software from EPEL. Enable EPEL on your system
(https://fedoraproject.org/wiki/EPEL), then "yum install mod_proxy_fcgi".

Building from source
====================

Building from source can be a bit more technical.  
Additionally, a new LoadModule directive needs to be added to httpd configuration files.

You'll need the apxs utility, which ships in the Apache "devel" package
on Linux distributions. Install "httpd-devel" on Red Hat-based distros, and
"apache2-dev" on Debian-based distros.

Building from source on RHEL/CentOS 6
=====================================

To get the dependencies, source, compile, and install:

  yum install -y curl make autoconf gcc glibc-headers httpd-devel;
  curl -L https://github.com/ceph/mod-proxy-fcgi/archive/master.tar.gz | tar xz && cd mod-proxy-fcgi-master;
  cd mod-proxy-fcgi-master;
  autoconf;
  ./configure;
  make;
  make install;
  make clean;
  chmod 644 /usr/lib/apache2/modules/mod_proxy_fcgi.so;
  printf "LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so" > /etc/httpd/conf/httpd.conf;
  cd ..;
  rm -Rf mod-proxy-fcgi-master;

Building from source on Debian 7
================================

To get the dependencies, source, compile, and install:

  apt-get install -qy curl make autoconf gcc libc6-dev apache2-threaded-dev;
  curl -L https://github.com/ceph/mod-proxy-fcgi/archive/master.tar.gz | tar xz && cd mod-proxy-fcgi-master;
  cd mod-proxy-fcgi-master;
  ln -sf apxs2 /usr/bin/apxs;
  autoconf;
  ./configure;
  sed -i "s>top_srcdir\=>top_srcdir\=.>" Makefile;
  mkdir -p build;
  ln -sf /usr/share/apache2/build/instdso.sh build/instdso.sh;
  make;
  make install;
  make clean;
  chmod 644 /usr/lib/apache2/modules/mod_proxy_fcgi.so;
  printf "# Depends: proxy\nLoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so" > /etc/apache2/mods-available/proxy_fcgi.load;
  a2enmod proxy_fcgi;
  cd ..;
  rm -Rf mod-proxy-fcgi-master;
  rm /usr/bin/apxs;

Loading the module in Apache
============================

To load this module, you must add the main mod_proxy to your configuration,
then load mod_proxy_fcgi:

  LoadModule proxy_module modules/mod_proxy.so
  LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so

and of course reload the httpd server after your changes.

Configuring Apache
==================

See the upstream Apache documentation
(https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html) for details about
mod_proxy_fcgi.

In this backported version of the module, "ProxyPass" statements work on
Apache 2.2, but "SetHandler" statements do not work. Also, Apache 2.2's
mod_proxy only supports TCP sockets ("fcgi://"). You cannot use Unix domain
sockets ("unix://") with this backported version of mod_proxy_fcgi.

In other words, you should use the following type configuration:

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    LogLevel debug

    RewriteEngine On

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

    SetEnv proxy-nokeepalive 1

    ProxyPass / fcgi://127.0.01:9000/
</VirtualHost>

mod-proxy-fcgi's People

Contributors

ktdreyer avatar yehudasa avatar alfredodeza avatar lpalgarvio avatar ylavic 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.