diff --git a/README.md b/README.md index 1ee43e7a1..4ca4c7feb 100644 --- a/README.md +++ b/README.md @@ -11,19 +11,22 @@ The config files are bundled with the buildpack itself: * conf/httpd.conf * conf/php.ini +Configure Heroku to use this buildpack repo AND branch + + heroku config:set BUILDPACK_URL=git://github.com/winglian/heroku-buildpack-php.git#mpm-event-php-fpm Pre-compiling binaries ---------------------- +After building the binary below, update the OPT_BUILDPACK_URL variable in bin/compile to point to the url of the vulcan binary from Heroku + vulcan build -v -s ./build -p /tmp/build -c "./vulcan.sh" - cp /tmp/build.tgz src/build.tgz Hacking ------- To change this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack and push to it. - Meta ---- diff --git a/bin/compile b/bin/compile index c7aec13d1..5b8e6b3fc 100755 --- a/bin/compile +++ b/bin/compile @@ -5,12 +5,12 @@ set -e # config -APACHE_VERSION="2.2.23" +APACHE_VERSION="2.4.3" APACHE_PATH="apache" -PHP_VERSION="5.3.17" +PHP_VERSION="5.4.8" PHP_PATH="php" -BUILDPACK_VERSION="1.2" - +BUILDPACK_VERSION="2.0-a3" +OPT_BUILDPACK_URL="http://vulcan-wlian.herokuapp.com/output/3769458a-2650-4189-a50f-f3bd9c685c75" BIN_DIR=$(dirname $0) BUILD_DIR=$1 @@ -34,7 +34,8 @@ fi BP_URL="https://s3.amazonaws.com/licorice-labs-buildpacks/apache-$APACHE_VERSION-php-$PHP_VERSION-v$BUILDPACK_VERSION.tar.gz" echo "-----> Bundling Apache $APACHE_VERSION PHP $PHP_VERSION build $BUILDPACK_VERSION" -curl --silent --max-time 60 --location "$BP_URL" | tar xz +# curl --silent --max-time 60 --location "$BP_URL" | tar xz +curl --silent --max-time 60 --location "$OPT_BUILDPACK_URL" | tar xz # echo "-----> Extracting bsdiff binary" # tar xzf $LP_DIR/src/bsdiff.tgz @@ -46,6 +47,7 @@ curl --silent --max-time 60 --location "$BP_URL" | tar xz # update config files cp $LP_DIR/conf/httpd.conf $APACHE_PATH/conf cp $LP_DIR/conf/php.ini php +cp $LP_DIR/conf/php-fpm.conf $BUILD_DIR/php/etc/ # make php available on bin mkdir -p bin @@ -86,6 +88,9 @@ if [ -d www/.hooks ]; then done fi +echo "Launching PHP FPM" +/app/php/sbin/php-fpm -y /app/php/etc/php-fpm.conf -c /app/php/php.ini + echo "Launching apache" exec /app/apache/bin/httpd -DNO_DETACH EOF diff --git a/build/vulcan.sh b/build/vulcan.sh index 0c32fe429..572907bc6 100755 --- a/build/vulcan.sh +++ b/build/vulcan.sh @@ -7,12 +7,11 @@ mkdir /app/local/bin mkdir /app/local/include mkdir /app/apache mkdir /app/php -mkdir /app/php/ext cd /tmp -curl -O http://mirrors.us.kernel.org/ubuntu//pool/universe/m/mcrypt/mcrypt_2.6.8-1_amd64.deb -curl -O http://mirrors.us.kernel.org/ubuntu//pool/universe/libm/libmcrypt/libmcrypt4_2.5.8-3.1_amd64.deb -curl -O http://mirrors.us.kernel.org/ubuntu//pool/universe/libm/libmcrypt/libmcrypt-dev_2.5.8-3.1_amd64.deb +curl -O http://mirrors.us.kernel.org/ubuntu/pool/universe/m/mcrypt/mcrypt_2.6.8-1_amd64.deb +curl -O http://mirrors.us.kernel.org/ubuntu/pool/universe/libm/libmcrypt/libmcrypt4_2.5.8-3.1_amd64.deb +curl -O http://mirrors.us.kernel.org/ubuntu/pool/universe/libm/libmcrypt/libmcrypt-dev_2.5.8-3.1_amd64.deb ls -tr *.deb > packages.txt while read l; do ar x $l @@ -23,18 +22,39 @@ done < packages.txt cp -a /tmp/usr/include/* /app/local/include cp -a /tmp/usr/lib/* /app/local/lib +# export APACHE_MIRROR_HOST="http://www.apache.org/dist" +export APACHE_MIRROR_HOST="http://apache.mirrors.tds.net" + # curl -L ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz -o /tmp/libmcrypt-2.5.7.tar.gz # curl -L ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.25.tar.gz -o /tmp/cyrus-sasl-2.1.25.tar.gz -curl -L https://launchpad.net/libmemcached/1.0/1.0.11/+download/libmemcached-1.0.11.tar.gz -o /tmp/libmemcached-1.0.11.tar.gz -curl -L http://www.apache.org/dist/httpd/httpd-2.2.23.tar.gz -o /tmp/httpd-2.2.23.tar.gz -curl -L http://us.php.net/get/php-5.3.17.tar.gz/from/us2.php.net/mirror -o /tmp/php-5.3.17.tar.gz +echo "downloading libmemcached" +curl -L https://launchpad.net/libmemcached/1.0/1.0.13/+download/libmemcached-1.0.13.tar.gz -o /tmp/libmemcached-1.0.13.tar.gz +echo "downloading PCRE" +curl -L ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz -o /tmp/pcre-8.31.tar.gz +echo "downloading apr" +curl -L ${APACHE_MIRROR_HOST}/apr/apr-1.4.6.tar.gz -o /tmp/apr-1.4.6.tar.gz +echo "downloading apr-util" +curl -L ${APACHE_MIRROR_HOST}/apr/apr-util-1.5.1.tar.gz -o /tmp/apr-util-1.5.1.tar.gz +echo "downloading httpd" +curl -L ${APACHE_MIRROR_HOST}/httpd/httpd-2.4.3.tar.gz -o /tmp/httpd-2.4.3.tar.gz +echo "downloading php" +curl -L http://us.php.net/get/php-5.4.8.tar.gz/from/us2.php.net/mirror -o /tmp/php-5.4.8.tar.gz +echo "downloading pecl-memcached" curl -L http://pecl.php.net/get/memcached-2.1.0.tgz -o /tmp/memcached-2.1.0.tgz # tar -C /tmp -xzf /tmp/libmcrypt-2.5.7.tar.gz # tar -C /tmp -xzf /tmp/cyrus-sasl-2.1.25.tar.gz -tar -C /tmp -xzf /tmp/libmemcached-1.0.11.tar.gz -tar -C /tmp -xzf /tmp/httpd-2.2.23.tar.gz -tar -C /tmp -xzf /tmp/php-5.3.17.tar.gz +tar -C /tmp -xzf /tmp/libmemcached-1.0.13.tar.gz +tar -C /tmp -xzf /tmp/pcre-8.31.tar.gz +tar -C /tmp -xzf /tmp/httpd-2.4.3.tar.gz + +tar -C /tmp/httpd-2.4.3/srclib -xzf /tmp/apr-1.4.6.tar.gz +mv /tmp/httpd-2.4.3/srclib/apr-1.4.6 /tmp/httpd-2.4.3/srclib/apr + +tar -C /tmp/httpd-2.4.3/srclib -xzf /tmp/apr-util-1.5.1.tar.gz +mv /tmp/httpd-2.4.3/srclib/apr-util-1.5.1 /tmp/httpd-2.4.3/srclib/apr-util + +tar -C /tmp -xzf /tmp/php-5.4.8.tar.gz tar -C /tmp -xzf /tmp/memcached-2.1.0.tgz export CFLAGS='-g0 -O2 -s -m64 -march=core2 -mtune=generic -pipe ' @@ -48,33 +68,41 @@ export MAKE_CMD="/usr/bin/make $MAKEFLAGS" # ./configure --prefix=/app/local --disable-posix-threads --enable-dynamic-loading --enable-static-link # ${MAKE_CMD} && ${MAKE_CMD} install -cd /tmp/httpd-2.2.23 -./configure --prefix=/app/apache --enable-rewrite --enable-so --enable-deflate --enable-expires --enable-headers +cd /tmp/pcre-8.31 +./configure --prefix=/app/local --enable-jit --enable-utf8 +${MAKE_CMD} && ${MAKE_CMD} install + +cd /tmp/httpd-2.4.3 +./configure --prefix=/app/apache --enable-rewrite --enable-so --enable-deflate --enable-expires --enable-headers --enable-proxy-fcgi --with-mpm=event --with-included-apr --with-pcre=/app/local ${MAKE_CMD} && ${MAKE_CMD} install -cd /tmp/php-5.3.17 -./configure --prefix=/app/php --with-apxs2=/app/apache/bin/apxs --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv --with-gd --with-curl=/usr/lib --with-config-file-path=/app/php --enable-soap=shared --with-openssl --enable-mbstring --with-mhash --enable-mysqlnd --with-pear --with-mysqli=mysqlnd --disable-cgi --with-jpeg-dir --with-png-dir --with-mcrypt=/app/local --enable-static +cd /tmp +git clone git://github.com/ByteInternet/libapache-mod-fastcgi.git +cd /tmp/libapache-mod-fastcgi/ +patch -p1 < debian/patches/byte-compile-against-apache24.diff +sed -e "s%/usr/local/apache2%/app/apache%" Makefile.AP2 > Makefile +${MAKE_CMD} && ${MAKE_CMD} install + +cd /tmp/php-5.4.8 +./configure --prefix=/app/php --with-apxs2=/app/apache/bin/apxs --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv --with-gd --with-curl=/usr/lib --with-config-file-path=/app/php --enable-soap=shared --with-openssl --enable-mbstring --with-mhash --enable-mysqlnd --with-pear --with-mysqli=mysqlnd --with-jpeg-dir --with-png-dir --with-mcrypt=/app/local --enable-static --enable-fpm --with-pcre-dir=/app/local ${MAKE_CMD} && ${MAKE_CMD} install /app/php/bin/pear config-set php_dir /app/php -/app/php/bin/pecl install igbinary echo " " | /app/php/bin/pecl install memcache -echo " " | /app/php/bin/pecl install apc +echo " " | /app/php/bin/pecl install apc-3.1.13 +/app/php/bin/pecl install igbinary # cd /tmp/cyrus-sasl-2.1.25 # ./configure --prefix=/app/local # ${MAKE_CMD} && ${MAKE_CMD} install # export SASL_PATH=/app/local/lib/sasl2 -cd /tmp/libmemcached-1.0.11 +cd /tmp/libmemcached-1.0.13 ./configure --prefix=/app/local # the configure script detects sasl, but is still foobar'ed # sed -i 's/LIBMEMCACHED_WITH_SASL_SUPPORT 0/LIBMEMCACHED_WITH_SASL_SUPPORT 1/' Makefile ${MAKE_CMD} && ${MAKE_CMD} install -# for libmemcached 1.0.4 -# LDFLAGS=-L/app/local/lib ./configure --prefix=/app/local --with-libsasl2-prefix=/usr - cd /tmp/memcached-2.1.0 /app/php/bin/phpize ./configure --with-libmemcached-dir=/app/local \ @@ -85,8 +113,8 @@ cd /tmp/memcached-2.1.0 --enable-static ${MAKE_CMD} && ${MAKE_CMD} install -echo '2.2.23' > /app/apache/VERSION -echo '5.3.17' > /app/php/VERSION +echo '2.4.3' > /app/apache/VERSION +echo '5.4.8' > /app/php/VERSION mkdir /tmp/build mkdir /tmp/build/local mkdir /tmp/build/local/lib @@ -97,6 +125,7 @@ cp -a /app/php /tmp/build/ # cp -aL /app/local/lib/libhashkit.so.2 /tmp/build/local/lib/ cp -aL /app/local/lib/libmcrypt.so.4 /tmp/build/local/lib/ cp -aL /app/local/lib/libmemcached.so.11 /tmp/build/local/lib/ +cp -aL /app/local/lib/libpcre.so.1 /tmp/build/local/lib/ # cp -aL /app/local/lib/libmemcachedprotocol.so.0 /tmp/build/local/lib/ # cp -aL /app/local/lib/libmemcachedutil.so.2 /tmp/build/local/lib/ # cp -aL /app/local/lib/sasl2/*.so.2 /tmp/build/local/lib/sasl2/ diff --git a/conf/httpd.conf b/conf/httpd.conf index 56afcaa16..dfb02a132 100644 --- a/conf/httpd.conf +++ b/conf/httpd.conf @@ -1,9 +1,9 @@ # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. -# See for detailed information. +# See for detailed information. # In particular, see -# +# # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding @@ -13,20 +13,32 @@ # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin -# with "/", the value of ServerRoot is prepended -- so "logs/foo_log" -# with ServerRoot set to "/app/apache/" will be interpreted by the -# server as "/app/apache/logs/foo_log". +# with "/", the value of ServerRoot is prepended -- so "logs/access_log" +# with ServerRoot set to "/usr/local/apache2" will be interpreted by the +# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" +# will be interpreted as '/logs/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point -# ServerRoot at a non-local disk, be sure to point the LockFile directive -# at a local disk. If you wish to share the same ServerRoot for multiple -# httpd daemons, you will need to change at least LockFile and PidFile. +# ServerRoot at a non-local disk, be sure to specify a local disk on the +# Mutex directive, if file-based mutexes are used. If you wish to share the +# same ServerRoot for multiple httpd daemons, you will need to change at +# least PidFile. # -ServerRoot "/app/apache/" +ServerRoot "/app/apache" + +# +# Mutex: Allows you to set the mutex mechanism and mutex file directory +# for individual mutexes, or change the global defaults +# +# Uncomment and change the directory if mutexes are file-based and the default +# mutex file directory is not on a local disk or is not appropriate for some +# other reason. +# +# Mutex default:logs # # Listen: Allows you to bind Apache to specific IP addresses and/or @@ -39,10 +51,6 @@ ServerRoot "/app/apache/" #Listen 12.34.56.78:80 Listen ${PORT} -ServerLimit 8 -MaxClients 8 -ListenBackLog 1024 - # # Dynamic Shared Object (DSO) Support # @@ -54,11 +62,92 @@ ListenBackLog 1024 # # Example: # LoadModule foo_module modules/mod_foo.so -LoadModule php5_module modules/libphp5.so # - - - +LoadModule authn_file_module modules/mod_authn_file.so +#LoadModule authn_dbm_module modules/mod_authn_dbm.so +#LoadModule authn_anon_module modules/mod_authn_anon.so +#LoadModule authn_dbd_module modules/mod_authn_dbd.so +#LoadModule authn_socache_module modules/mod_authn_socache.so +LoadModule authn_core_module modules/mod_authn_core.so +LoadModule authz_host_module modules/mod_authz_host.so +LoadModule authz_groupfile_module modules/mod_authz_groupfile.so +LoadModule authz_user_module modules/mod_authz_user.so +#LoadModule authz_dbm_module modules/mod_authz_dbm.so +#LoadModule authz_owner_module modules/mod_authz_owner.so +#LoadModule authz_dbd_module modules/mod_authz_dbd.so +LoadModule authz_core_module modules/mod_authz_core.so +LoadModule access_compat_module modules/mod_access_compat.so +LoadModule auth_basic_module modules/mod_auth_basic.so +#LoadModule auth_form_module modules/mod_auth_form.so +#LoadModule auth_digest_module modules/mod_auth_digest.so +#LoadModule allowmethods_module modules/mod_allowmethods.so +#LoadModule file_cache_module modules/mod_file_cache.so +#LoadModule cache_module modules/mod_cache.so +#LoadModule cache_disk_module modules/mod_cache_disk.so +#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so +#LoadModule socache_dbm_module modules/mod_socache_dbm.so +#LoadModule socache_memcache_module modules/mod_socache_memcache.so +#LoadModule dbd_module modules/mod_dbd.so +#LoadModule dumpio_module modules/mod_dumpio.so +#LoadModule buffer_module modules/mod_buffer.so +#LoadModule ratelimit_module modules/mod_ratelimit.so +LoadModule reqtimeout_module modules/mod_reqtimeout.so +#LoadModule ext_filter_module modules/mod_ext_filter.so +#LoadModule request_module modules/mod_request.so +#LoadModule include_module modules/mod_include.so +LoadModule filter_module modules/mod_filter.so +#LoadModule substitute_module modules/mod_substitute.so +#LoadModule sed_module modules/mod_sed.so +#LoadModule deflate_module modules/mod_deflate.so +LoadModule mime_module modules/mod_mime.so +LoadModule log_config_module modules/mod_log_config.so +#LoadModule log_debug_module modules/mod_log_debug.so +#LoadModule logio_module modules/mod_logio.so +LoadModule env_module modules/mod_env.so +LoadModule expires_module modules/mod_expires.so +LoadModule headers_module modules/mod_headers.so +#LoadModule unique_id_module modules/mod_unique_id.so +LoadModule setenvif_module modules/mod_setenvif.so +LoadModule version_module modules/mod_version.so +#LoadModule remoteip_module modules/mod_remoteip.so +#LoadModule proxy_module modules/mod_proxy.so +#LoadModule proxy_connect_module modules/mod_proxy_connect.so +#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so +#LoadModule proxy_http_module modules/mod_proxy_http.so +#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so +#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so +#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so +#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so +#LoadModule proxy_express_module modules/mod_proxy_express.so +#LoadModule session_module modules/mod_session.so +#LoadModule session_cookie_module modules/mod_session_cookie.so +#LoadModule session_dbd_module modules/mod_session_dbd.so +#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so +#LoadModule ssl_module modules/mod_ssl.so +#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so +#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so +#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so +#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so +LoadModule unixd_module modules/mod_unixd.so +#LoadModule dav_module modules/mod_dav.so +LoadModule status_module modules/mod_status.so +LoadModule autoindex_module modules/mod_autoindex.so +#LoadModule info_module modules/mod_info.so +#LoadModule cgid_module modules/mod_cgid.so +#LoadModule dav_fs_module modules/mod_dav_fs.so +#LoadModule vhost_alias_module modules/mod_vhost_alias.so +#LoadModule negotiation_module modules/mod_negotiation.so +LoadModule dir_module modules/mod_dir.so +LoadModule actions_module modules/mod_actions.so +#LoadModule speling_module modules/mod_speling.so +#LoadModule userdir_module modules/mod_userdir.so +LoadModule alias_module modules/mod_alias.so +LoadModule rewrite_module modules/mod_rewrite.so +# LoadModule php5_module modules/libphp5.so +LoadModule fastcgi_module modules/mod_fastcgi.so + + + # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. @@ -70,7 +159,6 @@ LoadModule php5_module modules/libphp5.so User daemon Group daemon - # 'Main' server configuration @@ -99,6 +187,8 @@ ServerAdmin you@example.com # # If your host doesn't have a registered DNS name, enter its IP address here. # +#ServerName www.example.com:80 + ServerName 127.0.0.1 ServerSignature Off @@ -106,25 +196,13 @@ ServerTokens Prod HostnameLookups Off # -# DocumentRoot: The directory out of which you will serve your -# documents. By default, all requests are taken from this directory, but -# symbolic links and aliases may be used to point to other locations. -# -DocumentRoot "/app/www" - -# -# Each directory to which Apache has access can be configured with respect -# to which services and features are allowed and/or disabled in that -# directory (and its subdirectories). -# -# First, we configure the "default" to be a very restrictive set of -# features. +# Deny access to the entirety of your server's filesystem. You must +# explicitly permit access to web content directories in other +# blocks below. # - Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all + AllowOverride none + Require all denied # @@ -135,8 +213,11 @@ DocumentRoot "/app/www" # # -# This should be changed to whatever you set DocumentRoot to. +# DocumentRoot: The directory out of which you will serve your +# documents. By default, all requests are taken from this directory, but +# symbolic links and aliases may be used to point to other locations. # +DocumentRoot "/app/www" # # Possible values for the Options directive are "None", "All", @@ -147,7 +228,7 @@ DocumentRoot "/app/www" # doesn't give it to you. # # The Options directive is both complicated and important. Please see - # http://httpd.apache.org/docs/2.2/mod/core.html#options + # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks @@ -162,11 +243,16 @@ DocumentRoot "/app/www" # # Controls who can get stuff from this server. # - Order allow,deny - Allow from all - + Require all granted + + AddHandler php-cgi .php + Action php-cgi /php-cgi + ScriptAlias /php-cgi /app/apache/cgi-bin/php-cgi + FastCgiExternalServer /app/apache/cgi-bin/php-cgi -socket /app/php/var/run/php5-fpm.sock -pass-header Authorization + + # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. @@ -179,15 +265,9 @@ DocumentRoot "/app/www" # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # - - Order allow,deny - Deny from all - Satisfy All - - - - SetHandler application/x-httpd-php - + + Require all denied + # # ErrorLog: The location of the error log file. @@ -210,7 +290,7 @@ LogLevel warn # The following directives define some format nicknames for use with # a CustomLog directive (see below). # - LogFormat "%h %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" combined + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common @@ -225,7 +305,7 @@ LogLevel warn # define per- access logfiles, transactions will be # logged therein and *not* in this file. # - CustomLog "logs/access_log" combined + CustomLog "logs/access_log" common # # If you prefer a logfile with access, agent, and referer information @@ -270,7 +350,7 @@ LogLevel warn # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # - #Scriptsock logs/cgisock + #Scriptsock cgisock # @@ -280,21 +360,9 @@ LogLevel warn AllowOverride None Options None - Order allow,deny - Allow from all + Require all granted -# -# DefaultType: the default MIME type the server will use for a document -# if it cannot otherwise determine one, such as from filename extensions. -# If your server contains mostly text or HTML documents, "text/plain" is -# a good value. If most of your content is binary, such as applications -# or images, you may want to use "application/octet-stream" instead to -# keep browsers from trying to display binary files as though they are -# text. -# -DefaultType text/plain - # # TypesConfig points to the file containing the list of mappings from @@ -361,16 +429,24 @@ DefaultType text/plain #ErrorDocument 402 http://www.example.com/subscription_info.html # +# +# MaxRanges: Maximum number of Ranges in a request before +# returning the entire resource, or one of the special +# values 'default', 'none' or 'unlimited'. +# Default setting is to accept 200 Ranges. +#MaxRanges unlimited + # # EnableMMAP and EnableSendfile: On systems that support it, -# memory-mapping or the sendfile syscall is used to deliver +# memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. +# Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off -#EnableSendfile off +#EnableSendfile on # Supplemental configuration # @@ -409,6 +485,11 @@ DefaultType text/plain # Various default settings #Include conf/extra/httpd-default.conf +# Configure mod_proxy_html to understand HTML4/XHTML1 + +Include conf/extra/proxy-html.conf + + # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf # @@ -420,3 +501,13 @@ DefaultType text/plain SSLRandomSeed startup builtin SSLRandomSeed connect builtin + +# Deal with user agents that deliberately violate open standards +# + +BrowserMatch "MSIE 10.0;" bad_DNT + + +RequestHeader unset DNT env=bad_DNT + + diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf new file mode 100644 index 000000000..45a85cbb9 --- /dev/null +++ b/conf/php-fpm.conf @@ -0,0 +1,20 @@ +; FPM Configuration + +; Global Options +[global] + +; Pool Definitions + +; Start a new pool named 'www'. +[www] + +user = nobody +group = nobody +listen = /app/php/var/run/php5-fpm.sock +; listen = 127.0.0.1:9000 +pm = dynamic +pm.max_children = 8 +pm.start_servers = 4 +pm.min_spare_servers = 2 +pm.max_spare_servers = 6 +pm.max_requests = 500 diff --git a/conf/php.ini b/conf/php.ini index aa9d7fdac..9fcdb3a7d 100644 --- a/conf/php.ini +++ b/conf/php.ini @@ -1910,7 +1910,7 @@ apc.stat=0 [memcached] extension=memcached.so -memcached.use_sasl = 1 +; memcached.use_sasl = 1 [igbinary] extension=igbinary.so @@ -1922,5 +1922,5 @@ session.serialize_handler=igbinary igbinary.compact_strings=On ; Use igbinary as serializer in APC cache (3.1.7 or later) -; apc.serializer=igbinary +apc.serializer=igbinary