Setting up a new Linode with Nginx + PHP7-FPM and Ubuntu 16.04 LTS from start to finish

Setting up your Linode

Linode
If you are not familiar with Linode, they are a provider of VPS (Virtual Private Servers) which is basically a semi-private version of shared hosting. You generally don’t have to share the box with hundreds of other people and even if you do you are guaranteed a certain share of the resources (CPU / RAM / etc). Not to mention the server hardware itself is extremely beast as far as power. You are in your own little private eco-system meaning you and only you have access to your machine (or slice of a machine rather). You will not experience the same horrible load times and transfer rates that you would get at companies like Go Daddy and Dreamhost (shudder). The only down side is you do not have a CPanel or Plesk panel (though you can install one if you wish, but I do not use them and will not go into that here) so you have to install and manage everything yourself. It’s not as hard as you might think if you can get used to searching Google and reading a lot of tutorials.

Command line can be a tricky beast for beginners, this blog aims to help ease some of that pain by sharing the procedures that I usually take when setting up my web server. Please be advised that with every new version of Linux the steps can vary a bit due to packages being upgraded or removed from the repositories.

This guide focuses on configuring the latest and greatest (at the time of this article) version of Ubuntu on a freshly provisioned Linode server. The exact system specs do not matter that much, you can use the lowest 1G plan if you like, the steps will be the same. I’m using the cheapest plan that costs $10 a month. You can check out Linode’s prices and decide for yourself.

Read more ›

Posted in Uncategorized

Setting up SSL with Nginx and SSLMate

SSLMate
I recently discovered a pretty amazing SSL service called SSLMate that is designed for developers and simplicity of use. Because of how simple they make things, this post will be extremely short. In fact, you could just head over to their page and easily get going by yourself. Nevertheless, I will outline it here.

If you prefer “free” instead and don’t mind doing extra work and navigating a confusing website, you can refer to my previous article Setting up SSL with Nginx and Startssl

Read more ›

Posted in Uncategorized

Installing & Configuring PhalconPHP

PhalconPHP

Phalcon PHP is a very impressive PHP MVC Framework that I’ve started to play around with. What differentiates it from the rest of the pack is the fact that it runs in memory on your server in the form of an extension. It’s compiled c code thus it’s executed much faster than a normal PHP framework would be. Unsurprisingly, this results in Phalcon blowing away all of the competition in speed tests.

Read more ›

Posted in Server Admin, Web Application Development Tagged with: , , , , , , , , , , , , , ,

Configuring PHP5-FPM Pools with Suhosin / Custom php.ini Settings

Suhosin

If you have followed my server setup guide you should already have php5-fpm installed using some pretty basic settings. Pools are very powerful and you can do a lot more with them if you choose. You can configure new pools that are only used by specific domain names, you might want this if you have a website that gets a lot more traffic than others on your server. Dedicated pools could make the website more stable and guarantee resources. You can also configure specific php.ini settings on a specific pool if you need to for instance lock down a specific domain so it can’t use certain functions, increase / decrease memory allowance, etc. It can be very useful.

Suhosin is an extension for the web server that allows you to further lock down various aspects of your PHP install. You can disable eval() which you can not do with the php.ini as it’s not a “real” function it’s a language construct. Basically Suhosin gives you a lot more power and flexibility, that normally you would not be able to attain. Suhosin works very well with php5-fpm pools, you can set it’s configuration variables just the same as you would with php.ini settings.

Read more ›

Posted in Server Admin, Web Application Development Tagged with: , , , , , , , ,

ExtJS 5.0 – Using a custom component in a grid column

Sencha

You may or may not be familiar with ExtJS 5.0’s action column functionality. It basically lets you put a number of static images in a column with click handlers for performing certain tasks. Unfortunately their implementation is severely limiting in almost all aspects. I’ve decided that I *may* use it for grids that only have 1-3 possible actions but for anything more I prefer to stick a menu button in the column instead.

Read more ›

Posted in Web Application Development Tagged with: , , , , , , , , , , , , ,

ExtJS 5.0 – Router Tweaks

Sencha

One of the coolest and most useful new tools included with ExtJS 5.0 is the app routing system. This is basically just some convenience methods around the already existing Ext.History module. In summmary it allows you to utilize the browser anchors (hash tags) to mimic page loads and lets you make use of the browser back and forward buttons. This comes in very handy when you wish to design a single page app.

Read more ›

Posted in Web Application Development Tagged with: , , , , , , , , , , , ,

ExtJS 5.0 – app.getController() fixes

Sencha
Right out of the box I’ve noticed that the getController() method on the Ext.app.Application object instances does not function correctly when accessing it from the global app property configuration. I am not sure if this is a bug Sencha has overlooked in the open source version of ExtJS 5 or not, but with a few simple changes you can suppress the errors and continue on your merry way.

Read more ›

Posted in Web Application Development Tagged with: , , , , , , , , , , , , , , ,

Automatic MySQL Backups

MySQL
This feature goes perfectly with my previous article on Google Drive Syncing. If you pair it with these automatic backups you can have your mysql backups automatically sync to your google drive account. I recommend checking that article out first then returning here and completing this guide as well.

Read more ›

Posted in Server Admin Tagged with: , , , , , ,

Google Drive syncing on Ubuntu

Google Drive
Google Drive is a perfect choice for performing web server backups. There’s no official linux client as far as I can make out but fortunately for us there is an open source implementation called “Grive” that does exactly what we want! This is my preferred backup provider currently as it gives 15G of space! Way more space than Dropbox and it seems a lot more stable.

Read more ›

Posted in Server Admin Tagged with: , , , , , , , , , , ,

Setting up SSL with Nginx & StartSSL (FREE!)

StartSSL
In the past I’ve used PositiveSSL to enable SSL on my domains, you can find my old article at my other blog if you for some reason still want to use PositiveSSL. I purchased my PositiveSSL certificates through namecheap.com a great website where I also purchase my domains. I recently discovered the 100% free StartSSL service and wanted to test it out. My biggest complaint is their website kind of blows, it’s confusing and slow and I had to wait because they were “over capacity” before I could sign up. But that aside, after it’s all over with, it works just fine and was pretty simple. The first step would be to go sign up and get the ball rolling. Head on over to their website and you’ll need to do a few steps (clicking a few buttons) to generate a cert for logging into the website. They will ask you to backup that cert etc so you don’t lose access to your account. When that is all said and done lets get started generating our domain certificates on our web server.

Read more ›

Posted in Server Admin Tagged with: , , , , , , , , , , , , , , , ,