Oct 9, 2015

How to deploy LEMP on VPSie and basic setup

What is LEMP LEMP is a variation of the ubiquitous LAMP stack used for developing and deploying web applications. Traditionally, LAMP consists of Linux, Apache, MySQL, and PHP. Due to its modular nature, the components can easily be swapped out. With LEMP, Apache is replaced with the lightweight yet powerful Nginx. How to deploy it Head to your VPSie account select the package you want to deploy: Screen Shot 2015-10-09 at 13.58.27 When done select the DataCenter where you want to deploy your new VPSie: Screen Shot 2015-10-09 at 13.58.48 Select your network setup which you want to use (if you are not sure go with the default setup): Screen Shot 2015-10-09 at 13.59.01 Then click on the Apps tab in the Operation System section and click on the LEMP: Screen Shot 2015-10-09 at 13.59.20 Add a hostname to your vpsie, we recomend to use as your hostname your fully qualified domain name and when done click on create vpsie button on the bottom: Screen Shot 2015-10-09 at 13.59.45 Once your LEMP VPSie is deployed you can check the default settings and installed php modules by browsing the info page by opening http://{VPSie IP address}/info.php in your default browser. Screen Shot 2015-10-09 at 14.09.15   The php files are located on your server in the /var/www/html. The nginx configuration files are located at /etc/nginx/. The virtual hosts configurations files are located at /etc/nginx/conf.d, we recomend using separate configuration files for each domain/subdomain hosted in your LEMP VPSie. The example virtual host configuration is located at /etc/nginx/conf.d/default.conf. If you want to change the php settings the proper configuration file is /etc/php5/fpm/php.ini. Every setting change in php side or nginx side will need a restart of the related service. For php is php5-fpm for nginx is nginx. You can do that by running the following commands:
#systemctl restart php5-fpm
#systemctl restart nginx
Note: The LEMP vpsie does not have ftp server running therefore for uploading the files we recomend to use any tool which supports SCP protocol or installing your own FTP server. Every php application has a different requirement therefore the example virtual host configuration might not fully work with your application.

Try us free for one full month today!