Monthly Archives: December 2015

WordPress

So you may have noticed there has been a lack of posts recently. I promise I haven’t given up on the site, I’ve just had a lot going on lately so it seemed like a great time to shake things up and move web site hosts. You might be wondering why I would want to change hosts, especially when the site has only been around for a couple months, it really came down to a couple reasons.

First, for a technically oriented blog that’s specifically about being a Systems Administrator, it seemed like a cop out to have the site hosted at Squarspace and not a VPS like a good little sysadmin. As of today, the site is running on a 1024 tier VPS with Linode (here’s my Linode referral link). When I had previously tried WordPress, I couldn’t find a theme I liked. There were a few I tried that were OK, but nothing great. This theme (Simplified Blog) is lightweight, easy on the eyes, and features a responsive design that looks great on mobile devices. If something should happen that this theme doesn’t stay update with future revisions of WordPress, unlikely since so far the dev has done a good job of keeping it up to date, I can always revert back to the WordPress default 2016 theme. 2016 looks, to me, much better than previous years’ themes did.

Other reasons for the change are that there are lots of things that are intrinsically handy about having a linux based VPS. Need to share a file that’s too large to email? Need a central place to store/share scripts? Need a place to learn more about scripting languages (but need something more useful than a test VM but less critical than a production environment)? Want an excuse to learn CSS or Javascript? A VPS is a great place to do all of that.

At $10 a month, Linode is twice as expensive as a tiny VPS at Digital Ocean. But for the extra $5 a month, I get a few extra GBs of storage (nice to have, but not critical) and 1 GB of RAM vs 512 MB. WordPress runs on PHP and MySQL, both of which like their RAM. The extra performance that RAM grants is worth the extra money per month. Even though this site doesn’t have a lot of readers (yet), what Sys Admin can turn down extra RAM? 🙂

WordPress Permalinks

When setting up WordPress, by default the way it structures links isn’t pretty. Not pretty at all. I wanted to have links so that the URL would tell you what the article is about. For instance, the URL of this post is: http://www.thesysadminlife.com/wordpress-permalinks/. However, changing the permalink setting within the WordPress dashboard ends up with a lot of broken links. Everything I could find online simply said if you have WordPress and you change that setting in the dashboard, it takes care of everything for you. Except it didn’t. Or at least it didn’t for me.

Eventually I found that the problem was a setting within my apache config. Specifically this setting:

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

 

Needed to be changed to:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

 

Change None to All

Once that was completed and Apache was restarted, everything worked beautifully.

Windows Task Scheduler: Directory Name is Invalid

Had a strange one happen today.  We recently replaced an old Windows 2003 server with a new Server 2012 R2 server.  Everything was going great until we recreated the scheduled tasks.  One of the tasks was failing instantly every time it starts.  The error message was:

“The Directory Name is Invalid”

After checking permissions for the domain account the task runs as, checking the various settings of the task, verifying the executable path is correct, and that the executable works when run manually as that user, I was out of ideas.  Time to check Google.

Turns out the optional setting for the “Action” aspect of the task doesn’t like quotes.  After removing the quotes from that field, the task worked fine.