Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradchesney79/4642771 to your computer and use it in GitHub Desktop.
Save bradchesney79/4642771 to your computer and use it in GitHub Desktop.
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
#/etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /fcgi-bin/>
Order allow,deny
Allow from all
</Directory>
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
</VirtualHost>
#/etc/apache2/mods-available/fastcgi.conf
FastCgiIpcDir /var/lib/apache2/fastcgi
AddHandler php5-fcgi .php
Action php5-fcgi /fcgi-bin
[www]
;/etc/php5/fpm/pool.d/www.conf
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