Category Archives: Technical

Geek Me: Linux in Windows

I’ve had rudimentary knowledge (i.e. Google) running Linux web servers for the 5-6 years, but decided to delve deeper into Linux. I’ve been in training last week to get my foundational learning in Linux, and plan on getting my Linux+/LPIC certs hopefully by the end of the year.

During training, I found out that as an alternative to VMs, Microsoft implemented WSL–Windows Subsystem for Linux–in some builds of Windows OS, namely Windows 10 and Windows Server 2016.

Got it installed on my home PC, which relieves some of the need to switch over to my Linux boxes when the mood strikes…

Adventures in cloud hosting

Free hosting drama has brought my site postings to a virtual standstill in the last 6-8 months. It took me a long time to decide on a new home for my websites, which is why there haven’t been too many entries on subjects such as gardening or cooking.

But I think I’ve found at semi-permanent home at cloud hosts Amazon Web Services (AWS) and Google Cloud Platform (GCP). Both cloud services offered a free tier on which I could flex my Linux muscle and try self-hosting WordPress remotely.

After several weeks of experimentation and false starts (notably a Bitnami solution that was a headache to learn on top of all the other things I need to be familiar with), I can report that my sites are back up and running. At least temporarily. If administration doesn’t suck up too much of time, I hope to catch up on all the posts from the past year, which I will likely compress in weekly or monthly summaries.

Suffice it to say, my current hosting set up consists of Ubuntu 16.04 running Apache/PHP/MariaDB, with Webmin control panel for client administration. There’s obviously more under the hood, but these are the major aspects.

Let the blogging continue…or restart.

Automation challenges: troubleshooting and fixing my own problems with a paid WP plugin

Published content has been sparse lately due to an issue I faced with a premium plugin that assisted automating feeds to multiple social networking platforms, aka NextScripts Social Network Auto Poster. The issue came to my attention in late October, early November, when I resumed tinkering around with my main (source) site. WordPress, of course, had released upgrades since I last posted in September, which also prompted a slew of plugin updates. Bizarrely, only self-hosted WP cross-posting was affected; other networks such as Instagram, Blogger/Google, and WordPress.com were not experiencing the issue. Thinking the plugin might be at fault (specifically the WP code/api), I opened a ticket at NextScripts for support on November 1.

Well, it’s 6 weeks later and NOT A SINGLE RESPONSE FROM DEV about my still-open ticket. The only feedback I had was from a forum participant who suggested my SNAP woes (parse error not well formed) were due to an encoding issue. A few Google searches seemed to agree with this diagnosis.

So I checked and cleaned up databases at my source and target self-hosted WP sites–it was remotely possible that interim WP updates might have “corrupted” my databases. But quick peeks under the db hoods seem to suggest nothing fishy with the collation or character sets–and I had seen no evidence of junk characters appearing in my blog. Just to be certain, I exported all my data, recreated databases and users anew, deleted stale data leftover from bygone plugins and past WP iterations, and uploaded data into the new tables. To no avail!

I implemented WP hardening, thanks to a bit of paranoia that suggested a compromised install. To make sure that my WP install wasn’t corrupted, hacked or even hijacked, I checked file permissions on the source host, downloaded fresh copies of WordPress core, and uploaded them to the host. I ran Wordfence security scans to ensure I wasn’t missing an errant bit of code or a hole I missed. I looked over every line in wp_config.php to make sure the options were correct and even enabled/disabled WP debugging to see if I could find the issue. I changed my WP passwords to ensure that non-alphanumerics weren’t the cause of the problem. And just to test my PHP coding knowledge, I started looking over the WP code for XMLRPC until I went bleary eyed with all lines I had to sift through. I went so far as to sign up for WordPress beta testing in case some outdated WP code might not be passing muster with the host configs. No dice!

At this point, I concluded that it wasn’t the things I had complete control over that were the source of the problems. With plugin help visibly MIA/unavailable, it was time to investigate the hosted environments. What was so different with my self-hosted servers from the WordPress.com sites? Shared web hosting plans can be notoriously unreliable depending on the nature of your website, even if they aggressively advertise how “WordPress-friendly” they are. Usage limits, content restrictions, and hosting configurations can confound even the most basic vanilla WP installs.

While Google-shooting my plugin issue, I found similar complaints with the Jetpack plugin and other remote publishing apps, so I followed the technical support proffered for the competing product. Varnish Cache issues? Varnish validation seem to suggest otherwise. Problem .htaccess permission issues? Generated a new file, remarked out unneeded lines. PHP versions and missing libraries? Tried all the different flavors and checked configuration pages to make sure the appropriate extensions were loaded. Ran some cURL tests to validate this as well.

A noticeable difference among the hosts I worked on to serve my sites were in the database and web hosting software used. Some deployed Apache/MySQL in a traditional LAMP (Linux-Apache-MySQL-PHP) stack. Some hosts used Nginx, some used MariaDB. After researching MariaDB and confirming that hosts were using the latest stable build, I decided that the Apache/Nginx difference was key in trying to work around the issue. This explained why some .htaccess rules were being honored like the snippets below.

# Disable modsecurity filter for xmlrpc
<Files xmlrpc.php>
SecFilterInheritance Off
</Files>

<FilesMatch "xmlrpc\.php$">
Satisfy Any
#Allow from yourdomain.com
#Allow from yourdomainip
Require host yourdomain.com
Require ip yourdomainip
#Deny from all
</FilesMatch>

Nginx doesn’t allow user-level control in an .htaccess file; server blocks are implemented in server-level configs. It seemed likely that the Nginx environment was set up to block XMLRPC calls, and if Varnish/Nginx were conspiring in tandem, then there was no way I could implement a fix myself. My only recourse to solve the issue was to move my sites off the Nginx hosts. Once that happened, automation started working again.

What was most frustrating about all this is the utter lack of feedback from the plugin developer. There was nothing in the online FAQs that helped me research this problem, no activity on the ticket I raised, and zero leads in the plugin community. Even a reply as simple as “check your host” or “will get back to you” would have been appreciated, though not necessarily the premium support one would expect after weeks of no comment. A premium plugin would not be a good investment if my site had more than one user or more bandwidth to support (but silly me, I paid for the thing anyway). I wouldn’t recommend business-critical or high-traffic sites subscribing to this plugin unless it’s tested to work in their hosted environment. Of course, you get what you pay for in some hosting environments, particularly shared or free ones.

Free hosting: near zero interaction with 1FreeHosting

If you’re looking for a non-starter free hosting service, then waste your time with 1FreeHosting. From the moment I signed up, I had zero response from 1FreeHosting about my problem trying to access the server assigned to me in order to FTP my files. Despite that the account sign up was smooth, that’s the extent of my positive experience with 1FreeHosting. Though every interaction appears to be conducted through their customized control panel, the lack of any in-person technical support pretty much turned me off from the service. Obviously if you are looking to a host your website, you’d want the ability to get your content on their servers–which never happened with 1FreeHosting despite what their help center suggests. I feel I have a number of years of experience at this sort of thing, but no amount tweaking got me the needed FTP account privileges to get a website up and running on their servers. Neither their cpanel FTP client nor my own desktop client was able to access my FTP site.

I had pretty much written off 1FreeHosting when 6 months later I get this automated cancellation notice from 1FreeHosting stating that they would be terminating my account for 30 days inactivity.

Important: we require that all websites must have index.html or index.php file uploaded directly to the `public_html` folder. Your website also must be fully operational.

Really hard to get anything uploaded to their hosting service when they can’t correct the FTP account access part. 30 days of inactivity notice coming 6 months after the fact? It’s a joke dealing with this service. Avoid 1FreeHosting.com at all costs.

Free hosting: getting nowhere with GBFreehosting.com

My search for free web hosting services landed me at GB Free Hosting. An initial review of their service looked promising: nicely populated FAQ, relatively good English, recent updates (as of 2015), and reasonable terms of service.

Unfortunately, from the moment I signed up to the time I attempted to access my hosting space, my experience has been far from superlative.

I encountered significant delays getting my sign up confirmations. When my account activation did finally arrive, it took some time to navigate their customized control panel looking for FTP information. Attempting to then use the FTP info resulted in refused connections.

I then attempted to reach their support by submitting a ticket through their control panel interface. To this day, the ticket has remained in Open status, presumably ignored. I also tried sending an email through their website contact form, which most likely fell into a black hole.

A registration lookup for the domain reveals an administration contact located in Islamabad, Punjab, through the GoDaddy registrar. Based on ping tests, the website itself is hosted somewhere in Bulgaria. Various reputation review sites ranks the domain gbfreehosting.com as risky and low on the trustworthiness scale. The IP block trace to my account’s server IP reveals registration to an Amsterdam, NL organization but places the server possibly in Kansas, US. Further ARIN searches revealed that the server hosting is managed by Hostinger International.

Due to the convoluted, suspicious server trail and the lack of contact/feedback with the site administrators, GBFreehosting.com is therefore not recommended and should be avoided.

gbfreehosting