PHPackages                             benjam1/symfttpd - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. benjam1/symfttpd

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

benjam1/symfttpd
================

PHP webserver

2.1.6(13y ago)151.7k3[9 issues](https://github.com/benja-M-1/symfttpd/issues)MITPHPPHP &gt;=5.3.2

Since Oct 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/benja-M-1/symfttpd)[ Packagist](https://packagist.org/packages/benjam1/symfttpd)[ RSS](/packages/benjam1-symfttpd/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (9)Versions (14)Used By (0)

symfttpd - [![Build Status](https://camo.githubusercontent.com/e520a182dd831f972e1190cd7fdec1e42049ab27bfd2d36e17428bdf0f8fba1d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f62656e6a612d4d2d312f73796d66747470642e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/benja-M-1/symfttpd)
=============================================================================================================================================================================================================================================================================================================

[](#symfttpd---)

Symfttpd is a command line tool to run a web server in your PHP project, aimed at lazy developers and sysadmins.

**This version of symfttpd is under development, this documentation can be outdated or contain some errors.**

`spawn` will setup and start a web server (lighttpd or nginx) with a minimal configuration to serve one PHP project. The server will not be run as a separate user, which is ideal for developers; also, the server logs will be written in the symfttpd's "log" directory and will include PHP errors.

`genconf` will generate all the rules necessary to setup a vhost in lighttpd. It leverages the `include_shell` directive which means no endless copy/pasting and easy updates (only restarting lighttpd is necessary).

Installation
------------

[](#installation)

### Locally

[](#locally)

#### As PHAR archive

[](#as-phar-archive)

[Download](http://benja-m-1.github.com/symfttpd/downloads/symfttpd.phar) the `.phar` file.

#### As requirement of your project

[](#as-requirement-of-your-project)

Add Symfttpd as a requirement of your project with Composer:

```
{
    …
    "require-dev": {
        "benjam1/symfttpd": "2.1.*@"
    },
    "config": {
        "bin-dir": "bin/"
    }
}

```

Then you can use Symfttpd running `bin/symfttpd`.

### Globally

[](#globally)

You can run these commands to install symfttpd globally:

```
$ sudo wget https://github.com/downloads/benja-M-1/symfttpd/symfttpd.phar -O /usr/local/bin/symfttpd
$ sudo chmod +x /usr/local/bin/symfttpd

```

### Source

[](#source)

Clone this repository and checkout the latest tag.

```
benjamin:~/dev benjamin $ git clone git://github.com/benja-M-1/symfttpd.git
benjamin:~/dev benjamin $ cd symfttpd
benjamin:~/dev/symfttpd benjamin $ git checkout v2.0.0-dev

```

Install the vendors with composer

```
benjamin:~/dev/symfttpd benjamin $ curl -s http://getcomposer.org/installer | php
benjamin:~/dev/symfttpd benjamin $ php composer.phar install

```

Then compile symfttpd in your project to create an executable `.phar` file

**In order to compile you have to set the `phar.readonly` setting to `Off` in you php.ini file.**

```
benjamin:~/dev/project benjamin $ php box.phar build
benjamin:~/dev/project benjamin $ php symfttpd.phar --help
Usage:
 help [--xml] [command_name]

Arguments:
 command               The command to execute
 command_name          The command name (default: 'help')

Options:
 --xml                 To output help as XML
 --help (-h)           Display this help message.
 --quiet (-q)          Do not output any message.
 --verbose (-v)        Increase verbosity of messages.
 --version (-V)        Display this application version.
 --ansi                Force ANSI output.
 --no-ansi             Disable ANSI output.
 --no-interaction (-n) Do not ask any interactive question.

Help:
 The help command displays help for a given command:

   php symfttpd.phar help list

 You can also output the help as XML by using the --xml option:

   php symfttpd.phar help --xml list

```

Configuration
-------------

[](#configuration)

### How?

[](#how)

First of all you need to configure symfttpd with a `symfttpd.conf.php` file.

```
benjamin:~/dev/project benjamin $ php symfttpd.phar init

```

*The init command is available since the version 2.1 of Symfttpd.*

Symfttpd looks for the configuration file:

- in your home directory, this file must be named `.symfttpd.conf.php`
- in the root directory of your project (or in config/ for a symfony 1.x project)

By default symfttpd read the configuration from its own `symfttpd.conf.php` file.

### What I have to configure?

[](#what-i-have-to-configure)

The minimal information symfttpd needs is a project type and a project version.

```
