Setting up WordPress on Nginx

0

NginxJust a quick post with a handy link for anyone looking to get WordPress running under Nginx (an awesome and much faster alternative to Apache!), one of the big differences between Nginx and Apache is the lack of .htaccess files and a different way of handling re-write rules which can cause headaches if you are used to using the “pretty” links in WordPress, or any other plugin that relies on Apache mod_rewrite rules (such as WPSuperCache).

Thankfully (and after many hours of googling and trying various less than ideal configs), I found the perfect setup guide in the most obvious place (and the last place I looked), possible – the WordPress Codex section, so for anyone struggling with Nginx and WordPress, or wanting to streamline their configuration, give this guide a read:

http://codex.wordpress.org/Nginx

PHP

Slow Page Load Times with IIS7.5 and PHP 5.3

2

So today has largely been spent prepping a shiny new VM for our Sugar CRM and Intranet site which I’m hoping to migrate over soon however I have spent most of this afternoon trying to figure out why page load times have suddenly shot up to over 2.5 seconds! This is only a fresh install of Sugar CRM that I have migrated so there is no data and yet *every* page is taking well over 2 seconds to load.

Even testing with a fresh install of PHP from a zip file off of their website (rather than using the Web Platform Installer), still results in long page loads, which is annoying as it means I can’t blame MS!

Downgrading to PHP 5.2 (thanks Web PI for allowing side by side installs of PHP!), instantly fixes the problems and my page loads go from 2.5s to under 1s, this is odd!

Even Google doesn’t seem to have many suggestions, but there are people who seem to have similar problems too, what gets odder is the few people who claim to have fixed it seem to imply that the issue is MySQL????

After an hour or so of comparing various forum posts claiming to have fixed it I have finally figured out the problem, in the 5.3 builds of PHP there is a bug that causes the slowdowns that is caused somewhere in the MySQL module during the mysql_connect phase.

To fix this it is as easy as changing your database connection from using a hostname (such as localhost or server.com), and instead using an IP address (such as 127.0.0.1 or 192.168.1.2). After a quick restart of IIS to make sure the changes get applied page loads are back down where I expect them to be.

Linode

New Year, New Host

2

Well, its 2011 already so I guess its time to start my promise to post more often (and even finish part 3 of my SSL guide!).

My first job for the year has been completed successfully as the site has been moved onto a new host, I finally cracked and moved back to managing my own server, this time I am using the highly recommended Linode who so far have been pretty awesome, for a small 512MB VPS everything has been flying along, even when compiling (yes, I run Gentoo on a server). So far everything feels a bit faster and at least I now have the freedom to fix problems that I find such as the annoying mod_security problem I hit where it was preventing me from having the words /etc/ssl together because it thought I was trying to hack the server rather than write about a linux configuration file!

Hopefully everything got moved over successfully, I haven’t been able to spot any problems but if you see anything let me know in the comments!

The wolves thin the RAID arrays, removing the slowest and weakest disks to keep the average seek speed high.

How to Speed up your RAID array’s

0

Quite simple really, just add wolves to your server room (care of XKCD)

The wolves thin the RAID arrays, removing the slowest and weakest disks to keep the average seek speed high.

Things just got better

New look – maybe even some new content too

0

Things just got betterAs you might have noticed I’ve given my blog a bit of a new look, hopefully it is nice and easy to navigate and it should load quite a bit faster than the old theme I was using, it’s also about time I posted up the final part of my SSL guide and I may even force myself to find time to blog a bit more about other things too, go me!

Go to Top