Thursday, December 25, 2014

Install Laravel on Ubuntu 14.04 VPS with Ajenti


I have installed Ajenti Control Panel on my amazon server. I needed to install laravel on that server. Today i will write how to install Laravel on Ubuntu 14.04 VPS.



1. First install PHP5-clii
$ apt-get install php5-cli

2. Install composer.
$ curl -sS https://getcomposer.org/installer | php

3. Move composer to usr/local/bin location.
$  mv composer.phar /usr/local/bin/composer

4. Install PHP5-mcrypt.
$ apt-get install php5-mcrypt

5. Enable it.
$ php5enmod mcrypt

6. Create a new laravel project.
$ composer create-project laravel/laravel /srv/tlabsinc.com/laravel/ 4.1

7. keep proper permission of laravel project.
$ sudo chown -R :www-data /srv/tlabsinc.com/laravel/
$ chmod -R 775 /srv/tlabsinc.com/laravel/app/storage

8. Sometimes you may have to run an existing project. that time clone it on your directory. On ajenti admin panel – websites-set the website root path-
/srv/tlabsinc.com/laravel/public
Restart webservice and check you domain. You can see laravel project Interface.

9. Sometimes you will get an error =>
403 error Nginx.
In this situation go to ajenti admin panel – websites- laravel.tlabsinc.com – On the advance tab – You can see Custom configuration.
try_files $uri $uri/ /index.php;
Then restart the web service.

1 comment:

  1. Well that wasn't so hard! Figuring out Linux on my VPS Server in Hong Kong sure has been a pain in the neck... but hopefully it'll get easier as I use it more (and I'll certainly be using it a lot now that I've got this new VPS!)

    ReplyDelete