{"id":18095,"date":"2015-11-23T14:40:25","date_gmt":"2015-11-23T20:40:25","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=18095"},"modified":"2022-06-03T03:44:02","modified_gmt":"2022-06-03T08:44:02","slug":"how-to-install-fuelphp-with-nginx-on-debian-8-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-fuelphp-with-nginx-on-debian-8-vps\/","title":{"rendered":"How to install FuelPHP with Nginx on a Debian 8 VPS"},"content":{"rendered":"
FuelPHP is a PHP framework which is simple, flexible and driven by the community. It is designed from the ground up to support the Hierarchical model\u2013view\u2013controller (HMVC) and it provides command line tool to create projects, debug projects or perform similar tasks. Today we will show you how to install FuelPHP on a Linux VPS<\/a>.<\/p>\n <\/p>\n Since we are going to install FuelPHP on a Debian 8 VPS<\/a> with Nginx as a web server already preinstalled, make sure that you have Nginx preinstalled on your server too. If you do not have Nginx preinstalled on your server you can use our LEMP stack installation<\/a> guide to install Nginx and the other LEMP stack components.<\/p>\n If Nginx is installed on your server you can continue with the instructions below. This could take a few moments. Once the update is completed, you can continue with the other steps. Go ahead and install Git by using the following command:<\/p>\n We will use the quick installer to install FuelPHP. First download the Oil package using curl:<\/p>\n This will download the Oil package and will store it into the ‘\/usr\/bin’ directory on your Debian VPS<\/a>. Later, you can use Oil to create Fuel projects. To create a new FuelPHP project, navigate to the ‘\/var\/www’ directory:<\/p>\n and issue the following command:<\/p>\n It will take a few moments for your first project to be ready. The installer will also run ‘oil refine install’ and ‘php composer.phar update’ which make some of the necessary directories writable and pull the composer dependencies.<\/p>\n Now, create a new Nginx configuration file and add the following virtual block for your domain name:<\/p>\n Enter the following content:<\/p>\n Do not forget to replace domainname.com with your actual domain name. Save the file, enable the site and restart Nginx so the changes can take effect. Now you should be able to access your first FuelPHP project using a web browser. Open you favorite web browser and navigate to your domain name.<\/p>\n To get started with FuelPHP our recommendation is to read the official FuelPHP documentation available at http:\/\/fuelphp.com\/docs\/<\/a>. There you can find more information about how to configure your application, how to configure a database\u00a0etc.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS hosting<\/a> services, in which case you can simply ask our expert Linux admins to install FuelPHP for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" FuelPHP is a PHP framework which is simple, flexible and driven by the community. It is designed from the ground … <\/p>\n
\nFirst of all, connect to your server via SSH and update all your system software to the latest version available. Use the commands below for that purpose:<\/p>\nsudo apt-get update\r\nsudo apt-get upgrade<\/pre>\n
sudo apt-get install git-core<\/pre>\n
curl get.fuelphp.com\/oil | sh<\/pre>\n
cd \/var\/www\/<\/pre>\n
oil create first_project<\/pre>\n
nano \/etc\/nginx\/sites-available\/domainname<\/pre>\n
server {\r\n server_name domainname.com;\r\n\r\n access_log \/var\/log\/nginx\/domainname.com-access.log;\r\n error_log \/var\/log\/nginx\/domainname.com-error.log;\r\n root \/var\/www\/first_project\/public;\r\n\r\n location \/ {\r\n index index.php;\r\n try_files $uri $uri\/ \/index.php$is_args$args;\r\n }\r\n\r\n location ~ \\.php$ {\r\n include \/etc\/nginx\/fastcgi_params;\r\n fastcgi_pass unix:\/var\/run\/php5-fpm.sock;\r\n fastcgi_index index.php;\r\n fastcgi_param FUEL_ENV \"production\";\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n }\r\n}\r\n<\/pre>\n