Setting up Zend Framework2 Skeleton application in LAMP

February 5, 2013

In this article, we will create a Zend Framework2 application from a skelton application in Ubuntu 12.04. Here the application will be set up in Apache2 ‘s default document root ( /var/www ).

In order to develop a Zend Framework2 application, we need to have a web server with PHP installed. For installing Apache2 web server and PHP in Ubuntu, you can follow the given below articles.

Installing and Starting Apache2 Web Server in Ubuntu 12.04

Installing PHP in Ubuntu 12.04 to work with Apache2 web server

1. Installing git application

$sudo apt-get install git

2. Clone ZendSkeletonApplication from

$cd /var/www
$sudo git clone git://

Note : Now a directory namely ZendSkeletonApplication will be created in /var/www

3. Update configuration file for Composer

$cd ZendSkeletonApplication

$sudo php composer.phar self-update

4. Installing the Zend Framework2 and other dependent files to this application

$sudo php composer.phar install

5. Append the given below entry to theĀ  file /etc/hosts to add hostname zendskeletonapplication

6. Create a file namely zendskeletonapplication in /etc/apache2/sites-available with the given below directive to create a virtual host

<VirtualHost *:80>
    ServerName zendskeletonapplication
    DocumentRoot /var/www/ZendSkeletonApplication/public
    SetEnv APPLICATION_ENV "development"
    <Directory /var/www/zendskeletonapplication/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all

7. Enable the site zendskeletonapplication

$sudo a2ensite zendskeletonapplication

8. Enable Apache’s rewrite module

$sudo a2enmod rewrite

9. Restart Apache2 Web server

$sudo service apache2 restart

10. Accessing the application at the URL : http://zendskeletonapplication

Screenshot of the Zend Framework2 Skeleton Application

Figure 1 : Screenshot of the Zend Framework2 Skeleton Application

How to hire me?

I am George Mathew, working as software architect and Android app developer at

You can hire me on hourly basis or on project basis for Android applications development.

For hiring me, please mail your requirements to

My other blogs

Android Knowledge Quiz

Ready to test your knowledge in Android? Take this quiz :

Tags: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Be friend at g+

Subscribe for Lastest Updates

FBFPowered by ®Google Feedburner