Skip to content

Instantly share code, notes, and snippets.

@mifix
Last active February 22, 2016 03:23
Show Gist options
  • Select an option

  • Save mifix/6163975 to your computer and use it in GitHub Desktop.

Select an option

Save mifix/6163975 to your computer and use it in GitHub Desktop.

Revisions

  1. mifix revised this gist Oct 29, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions _etc_apache2_sites-enabled_chm
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,7 @@
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
    </Directory>

    AddHandler php5-fcgi .php
  2. mifix renamed this gist Aug 16, 2013. 1 changed file with 3 additions and 0 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    Prerequisites
    =============

    $ apt-get install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl


  3. mifix revised this gist Aug 16, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions System Packages
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    $ apt-get install apache2-mpm-workerlibapache2-mod-fastcgi php5-fpm php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
    $ apt-get install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl


    $ a2enmod actions fastcgi alias rewrite
    $ a2enmod actions fastcgi alias rewrite vhost_alias


    $ sudo service apache2 reload
  4. mifix created this gist Aug 6, 2013.
    8 changes: 8 additions & 0 deletions System Packages
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    $ apt-get install apache2-mpm-workerlibapache2-mod-fastcgi php5-fpm php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl


    $ a2enmod actions fastcgi alias rewrite


    $ sudo service apache2 reload
    $ sudo /etc/init.d/php5-fpm reload
    18 changes: 18 additions & 0 deletions _etc_apache2_sites-enabled_chm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    <Virtualhost *:80>
    VirtualDocumentRoot /home/mayer/Work/Workspace/www/%1
    ServerName chm.dev
    ServerAlias *.chm.dev
    UseCanonicalName Off
    <Directory "/home/mayer/Work/Workspace/www/*">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    AddHandler php5-fcgi .php
    Action php5-fcgi /php5-fcgi
    Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
    FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9001 -pass-header Authorization

    </Virtualhost>
    12 changes: 12 additions & 0 deletions _etc_php5_fpm_pool.d_chm.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    [example.com]
    listen = 127.0.0.1:9001
    listen.allowed_clients = 127.0.0.1
    user = mayer
    group = mayer
    pm = dynamic
    pm.max_children = 50
    pm.start_servers = 20
    pm.min_spare_servers = 5
    pm.max_spare_servers = 35
    chdir = /
    php_admin_value[open_basedir] = /var/www/:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/home/mayer/Work/Workspace/www