Fork me on GitHub

Webservers

The following webservers have been tested:

Apache + mod_php

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName mindaphp.dev

        DocumentRoot /home/maurits/public_html/mindaphp/web
        <Directory /home/maurits/public_html/mindaphp/web>
                AllowOverride All
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Benchmarks:

ab -n 2000 -c 10 http://mindaphp.dev/hello/world
Requests per second:    861.30 [#/sec] (mean)

Nginx + HHVM (Linux)

Install HHVM:

sudo add-apt-repository ppa:mapnik/boost
wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu precise main | sudo tee /etc/apt/sources.list.d/hhvm.list
sudo apt-get update
sudo apt-get install hhvm

from: https://github.com/facebook/hhvm/wiki/Prebuilt-packages-on-ubuntu-12.04

Configure Nginx:

$ cat /etc/nginx/sites-enabled/mindaphp 
server {
    listen 80;
    server_name mindaphp.dev;
    
    root /home/maurits/public_html/mindaphp/web;
    try_files $uri @proxy;

    location ~ \.php$ {
        return 403;
    }

    location ~ ^/debugger/$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root/debugger/index.php;
        include fastcgi_params;
    }

    location @proxy {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root/index.php;
        include fastcgi_params;
    }

}

Benchmarks:

ab -n 2000 -c 10 http://localhost:8080/hello/world
Requests per second:    2836.15 [#/sec] (mean)
close10:31:22 - get /docs/webservers - 1 ms - 1 MB - debugger