the itjerk

my adventures with technology

Tag Archives: web

hide xml from browsers

I publish a daily rss feed, an “Album Of The Day” type thing, that feeds various social media pages as well. It works automatically, so I don’t really have to do anything, other than make sure dlvr.it is working correctly (sometimes one needs to┬árenew app permissions). Down side, is that there’s a huge xml file out there that is easily accessible from any web browsers. It’s not that big of a deal, because, after all, I am publishing bits each day. But two lines of codes hides it from honest people:

First, create a css stylesheet. To hide everything, make sure the css applies to the root element of your xml file, which in my case is “albums”. Then you only need one line of code in your css file.

albums {visibility: hidden;}

Next, in the xml file, reference your stylesheet:

<?xml-stylesheet href=”rss.css” media=”screen” type=”text/css”?>

Ptoof! Empty page!

Of course, if you really want to hide that xml source, you’ll need to move it to a directory that’s not visible like /var/.

webhosting

Have you ever met anyone that is completely satisfied with their web host? Admittedly, one person's web host is certainly not another's. On one end of the scale, there are the complete "n00bs", those looking for template/one-click instant websites. In the middle are those that live for the control panel – options galore, lots of things to play with – but watch out when something doesn't work, aka the dreaded support-ticket. The other end are the experts, those that say "you keep the hardware running and bandwidth flowing and I'll take care of the software, thank you very much". You know, those that want c-o-n-t-r-o-l.

I've had surprisingly few web hosts over the past decade or so, Hostway and Dotster quickly come to mind. Neither were that bad at any one thing, but I'm not sure if I could find myself recommending either without qualification. Price, ease of use, uptime, yes, it's all fine and dandy, but did either earn superlatives, like "they're the best", "never had an issue", "great support"? Not really.

Enter Digital Ocean. They offer "droplets" – little virtual private servers you can create quickly. The price is right, $5 per month for your own little fluffy cloud on the internet, a 20GB SSD with 512MB RAM, and 1TB of Tier 1 bandwidth. You pick the OS, configure the DNS, and do EVERYTHING yourself. And there's the challenge: no control panel, no telephone support, no mail, scripts or templates: no nothing, other than shell access to your server. Ooooh, the geek in me wants one! And after a couple introductory email questions, I was presented with a $10 coupon, so yes, I took the bite and signed up.

And there I went, giving them a credit card, picking my OS, setting up a domain, and before I knew it, I was up and running. Next, after an apt-get update/upgrade and reboot, I installed LAMP, Drupal, vsftp, iptables, configured .htaccess and php mod_rewrite (for Drupal to work with clean urls), a few more apache2 tweaks, upload all of my website (which was the real chore), and viola, here I am, with a copy of my site running on a fully-functioning server that I configured by myself. Of course, I have one on my test server at home, but this one is in the cloud. Digital Ocean's documentation is very good and gets you most of the way there, though things like installing Drupal will only take you so far. But that's the fun of it – figuring it all out and making it work.

I am the web host.

On the web (referral link):
Digital Ocean Cloud Server/VPS

validation and accessibility

Created a new website? Be sure to take that extra step and ensure your code is correct! It's an easy way to ensure that your pages will display exactly how you intended them to. You don't want to end up like this:

or this:

Free tools, on the web:
http://validator.w3.org/
http://wave.webaim.org/

drupal

Okay, something new to learn, the Drupal content management system. I have some help from the good people at Ajenda.com and a great incentive in the discogs module written by karlheinz. Here's to the next incarnation of progressiverock.com!