Skip to content

Instantly share code, notes, and snippets.

@sts
sts / haproxy_maintenance.conf
Last active January 11, 2023 11:12
HAProxy Maintenance Page
#
# Proof of concept for a HAProxy maintenance mode
#
#
# Control the maintenance page during runtime using the stats socket:
#
# To put the whole site in maintenance mode (for all IPs):
# > add acl #0 0.0.0.0/0
#
# To exclude your own ip, so you are able to test things out:
#!/bin/sh
sudo apt-get install -y git-core
cd /tmp
git clone https://github.com/ByteInternet/libapache-mod-fastcgi.git
cd libapache-mod-fastcgi
patch -p1 < debian/patches/byte-compile-against-apache24.diff
sudo /usr/local/apache2/bin/apxs -i -a -o mod_fastcgi.so -c *.c
#!/bin/sh
sudo apt-get install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions libapt-pkg-perl
cd /tmp
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb
sudo dpkg -i webmin_1.690_all.deb
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm-acl
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Sets the necessary ACLs on /var/run/php-fpm
# Description: Sets the necessary ACLs on /var/run/php-fpm
### END INIT INFO
@diemuzi
diemuzi / README
Created October 7, 2012 19:44
Apache 2.2.x / 2.4.x FPM Configuration
This configuration is a working copy which I have tested on Apache 2.2.x and 2.4.x
I highly recommend you use this version of mod_fastcgi as it works with Apache 2.4.x, fastcgi.com version does not!
https://github.com/ByteInternet/libapache-mod-fastcgi
The fastcgi.com version is 2.4.6, the version I am recommending registers as 2.4.7
To patch mod_fastcgi for use with Apache 2.4.x look at the debian/patches folder. It's not specific to Debian OS so don't let that fool you. I personally use Archlinux.
Of course to compile mod_fastcgi: