1. Update and upgrade the system
sudo aptitude update && sudo aptitude upgrade
2. Reboot
sudo reboot
3. install Lamp
sudo tasksel install lamp-server
4. Check installation
http://yourserver/
Output:
It works!
This is the default web page for this server.The web server software is running but no content has been added, yet.
5. Enable mod_rewrite
sudo a2enmod rewrite
6. Edit /etc/apache2/sites-available/
<Directory /var/www/myproject> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
7. Copy your app folder to /var/www and replace "myproject" from step 6 with your folder name.
Its also possible to copy the project folder to any other directory in your server and create a symlink under /var/www.
cd /var/www
sudo ln -s path/to/my/project/folder myproject8.Check your site
sudo /etc/init.d/apache2 restart
http://yourserver/myproject
9. Enable writing on tmp folder
cd /myproject/app
chmod -R 777 tmp
10. Set database connection in myproject/app/config/database.php