As you may already know, the appserver has a fully HTTP/1.1 compliant Webserver included which is build upon our multithreaded server framework which is also available open-source on github as well.

Your vision is to detach Webservers as apache, nginx or lighttpd in long terms by providing the same feature-set and give you the opportunity to enhance our Webserver by just writing PHP code because its all written in PHP.

How to configure the Webserver?

At the beginning you have to set some main parameters for the server itself as shown in the example taken from our appserver main https-server configuration.

<server name="https" ...>
        <param name="admin" type="string"></param>
        <param name="software" type="string">appserver/1.0.0-beta4.19 (linux) PHP/5.5.19</param>
        <param name="workerNumber" type="integer">64</param>
        <param name="workerAcceptMin" type="integer">3</param>
        <param name="workerAcceptMax" type="integer">8</param>
        <param name="transport" type="string">ssl</param>
        <param name="address" type="string"></param>
        <param name="port" type="integer">9443</param>
        <param name="certPath" type="string">etc/appserver/server.pem</param>
        <param name="passphrase" type="string"></param>
        <param name="documentRoot" type="string">webapps</param>
        <param name="directoryIndex" type="string">index.php index.html index.htm</param>
        <param name="keepAliveMax" type="integer">64</param>
        <param name="keepAliveTimeout" type="integer">5</param>
        <param name="errorsPageTemplatePath" type="string">var/www/errors/error.phtml</param>

An detailed description of every parameter can be found under docs.

Virtual Hosts

What would live without having the possibility setting up virtual hosts within a HTTP(S) Server and of course our Webserver is offering you the ability in a simple but flexible way.

See the simplest virtual host configuration:

<server name="https" ...>
      <virtualHost name="myapp.local">
          <param name="documentRoot" type="string">webapps/myapp</param>

It will introduce a new virtual host for myapp.local with the document root pointing to webapps/myapp. You can imagine that just reseting the document root is not the only thing you can do with the virtual host feature. More informations on that can be found under docs.


So what are rewrites for? Simply, rewrites are used to rewrite a requested url at server level to give the user the output for that final page he should see. So, for example, a user may go for, but will really be given by the server. Of course, the user will be none the wiser to this little bit of chicanery.

A simple rewrite to do this could look like this:

<server name="https" ...>
        <rewrite condition="-f" target="" flag="L" />
        <rewrite condition="^/(.*)$" target="index.php/$1" flag="L" />

If you want to know how it will work in detail and whats exactly beyond those attributes condition, target and flag just have a look to our docs.


You want to protect a folder or directory very easy using username and password credentials as you know it from apache or other Webservers? Just do it using the same .htpasswd files and a simple configuration like this:

<server name="https" ...>
        <authentication uri="^\/my\/protected\/folder\/.*">
                <param name="type" type="string">
                <param name="realm" type="string">
                    Basic Authentication System
                <param name="file" type="string">

Checkout our docs to get more into authentications and all the other cool features the Webserver provides you.

We appreciate any feedback So, do not hesitate to share your experiences or any problems you encountered while using it with us here via comments or better on github via the issue tracker. Cheers :-)