Reading time: 2 – 4 minutes You will have noticed I deviated my blog posts quite a bit from CFML in the last couple of months. That doesn’t mean I don’t love it anymore, but just that I’ve been “putting my eggs on lots of other baskets” lately. This blog is hosted on a VPS, […]
Reading time: 1 – 2 minutes Or my website even…. I’ve run some updates on my server today, and got prompted to upgrade mySQL. All went well during the upgrade, but when trying to browse, I’d get the following message: “Error establishing a database connection” Initially I thought it would be mySQL daemon trying to […]
I have been doing some housekeeping on my VPS, and decided there’s a few ports that should only be accessed by certain IP addresses for security purposes.
My VPS uses Linux, so I had to find a way to somehow changing my iptables settings to block the specific ports to every IP address, except for the ones I specified.
It’s pretty straight forward, and here how you can block a specific port to everyone except for some IP addresses (the instructions are for Centos 5.5, but should work for other distros without problems):
Open our iptables settings file:
To continue with our series of website optimization tricks, I’ll talk a little bit more about Content Delivery Network (CDN), and will talk you though the steps of creating a totally free CDN for your website.
Basically, as I’ve already stated on my previous post, a CDN is an external network which specializes in serving static content. It normally consists of a few servers spread around the world, so the data will travel the shortest route to get to their destination based on Geolocation.
Assets such as stylesheets, images and videos are often the major hit taken by a webserver when a webpage is loaded. I’m often trying to improve my page loads by using published pages (flat html) and rewrites, so I don’t need to run a dynamic page when it’s not necessary.
Publishing usually brings a great deal of improvement, and browser cache often helps a lot too, but sometimes you just need to load assets on every single page load, and if you have lots of new users every day, browser cache will usually do very little, as this new users will need to hit the webserver and get the images for the first time in order to have it cached.