Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Minimal commands to set up a working apache 2.2 httpd web server on Debian Wheezy (7.0).
apt-get install libapache2-mod-fastcgi apache2-mpm-worker php5-fpm
a2enmod actions
vi /etc/apache2/mods-available/fastcgi.conf
vi /etc/apache2/sites-available/default
vi /etc/php5/fpm/pool.d/www.conf
chown www-data:www-data /var/log/apache2/*.log
chown -R www-data:www-data /var/www
service php5-fpm restart
service apache2 restart
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
<Directory /fcgi-bin/>
Order allow,deny
Allow from all
FastCgiExternalServer /tmp/imaginary-file -socket /var/www/default.sock -user www-data -group www-data
Alias /fcgi-bin /tmp/imaginary-file
LogLevel warn
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
FastCgiIpcDir /var/lib/apache2/fastcgi
AddHandler php5-fcgi .php
Action php5-fcgi /fcgi-bin
user = www-data
group = www-data
listen = /var/www/default.sock
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s;
pm.max_requests = 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment