Making WordPress Domain Name Agnostic

When I was migrating this blog over to my own server at home reverse proxied at a VPS sitting somewhere, I ran into an issue where I could not figure out how the heck does one force the WordPress administration page to have a different subdomain from the where the site was installed to. Gave up on fixing it for a month or so and therefore, blog posts became… somewhat limited… Well it was limited anyways to start off with 😛

After trying out various solutions that mostly ended up in breaking the site, I’ve came across this idea:

http://wordpress.org/support/topic/no-site-url

The thread’s OP wanted a few different domains to point to his site regardless and not have WordPress further molest the URI’s being generated on the page. TL;DR the main idea was to use this:

$url = "http://".$_SERVER["HTTP_HOST"];

…inside the wp-config.php file.

And in turn:

define('WP_HOME',$url);
define('WP_SITEURL',$url);

Dang, lesson learned here – wp-config.php can be treated like a PHP script where you can call all sorts of variables, including the $_SERVER ones.

Of course, additional work is required on the nginx side to have the proxy to pass on the HTTP Host value as-is to the said internal site.

KB2750149 and the Failover Cluster GUI… Ouch

Last Patch Tuseday’s round had an update (KB2750149) for the .NET Framework on Windows 8/2012 systems that broke the Failover Cluster management UI. It’s a known issue for Microsoft as reported on their blog below:

http://blogs.technet.com/b/askcore/archive/2013/01/14/error-in-failover-cluster-manager-after-install-of-kb2750149.aspx

Unfortunately as of writing, Microsoft hasn’t pushed an update for fixing what they broke. However what they broke should not affect the functionality of the Failover Cluster itself. As the blog post stated above, the Failover Cluster will still function as normal and can still be managed using the PowerShell cmdlets or the command line tools.

To fix the issue you’ll probably have to either use DISM or the Windows Image Servicing PowerShell cmdlets to remove the .NET Framework Update. By performing a dism /online /get-packages or Get-WindowsPackage -Online and searching for the string ‘KB2750149’ should be sufficient enough to start the removal process.

Again before removing the patch, consult with the documentation. I can’t be responsible if you break your own system when you remove that patch mentioned above 😉

Nginx + Reverse Proxy Caching = Static Content Speed

Yes, if you’ve recently noticed, this site is now powered by nginx working as a reverse proxy.

So what does this mean? A WordPress blog running on low-end hardware on steroids. Yes this also can be done with Apache2, but I prefer nginx with PHP-FPM sitting as a backend because of the simplicity of configuring it in the first place 😉

Also thanks to the latest move from my old hosting provider to a VPS, I can run this WordPress site out of my home DSL connection with nginx being the reverse proxy and caching those responses 😉

Samba 4.0 Released!

This one missed my radar of to hunt down on… Samba 4.0 being released.

Why am I making such announcement here? Because Samba 4.0 is a huge release where it implements an Active Directory compatible ‘controller’. Yes, you heard that, Active Directory ‘compatible’.

Now on the part of being ‘compatible’, I’m not so sure how compatible it is, but at least Windows Server 2012 Member Servers can authenticate against it and the management tools can also be used with administering the Samba 4 domain. In theory this should also extend to Windows 7, 8 and possibly Windows XP Professional with the Windows Server 2003 Administration Tools installed.

Some tools that will not work with a Samba 4 domain are probably going to be Active Directory Administrative Center and PowerShell cmdlets for AD. Those interfaces require a real Windows Domain Controller that has a HTTP server that supports those interfaces

Download it here if you want to knock yourself out with it.

A few words about native VHD boot on 4K/512e Hard Drives…

I’ve gone cruising on the Interwebs for “Windows 8 Haters” just for laughs recently and I’ve found this portion of a comment left on some random site’s blog quite amusing:

2) It was so slow it hurt. And i have a quad core i5 @2.6 with 4 gb ram.

Uhm… Okay… I’ll fire off a few questions I’ve got in my back of my mind:

  • Are you using a brand new hard drive with that?
  • Did it also have an AF logo slapped on it?
  • Did you also try to do what the masses would have done, test Windows 8 out on a VHD?

If you answered yes to all of the questions above, then you’d seriously need to re-think what you’re doing. For the average “tech-savvy” user, I’d go easy on them, I mean who would really spend their time reading the TechNet Library for kicks. 😉

Pro tip for “speeding up” Windows 8 – Use the VHDX format to native boot into Windows 8 if you have a 512e disk. Doing so could greatly reduce the negative effects that RMW does on a hard drive. If you don’t know what RMW stands for and what the effects are, just think of it this way: If you have to make the disk read 2 physical sectors to address one NTFS block that spans across the 2 sectors, do you really think that it’s going to take longer to read that one sector? Heck yeah.

On the flip side, users who decide to hold out with Windows 7 or Server 2008 R2 are unfortunately out of luck. They can not native boot with a VHDX file at all. But they can boot the VHDX file under Hyper-V that’s for sure 😉