Archive

Archive for the ‘Web’ Category

My first Wikipedia article

January 15th, 2011 No comments

For someone who nominally “doesn’t like writing”, I rather enjoy writing articles on my blog. I never particularly enjoyed English at school, but now that I have a technical job that requires me only to make brief notes, I relish the opportunity to write about something I’m interested in once in a while.

I’ve been wanting to write something for Wikipedia for some time, but there’s almost nothing I know enough about to be authoritative, but that is specialised enough that I’m the first to write about it. A few months ago I started making some notes and collecting references about St Paul’s Church in Nuneaton, where I grew up. As with most other well-intended projects, it fell by the wayside in my busy life.

However, this week I saw news of Wikipedia’s 10th birthday, and had a slightly more personal reminder that Jimmy Wales, its founder, spoke in Bristol. This was enough of a stimulus to kick me back into action, and I spent some time transferring the article from my computer to a draft article on Wikipedia. I added some references, and after my “probationary period” at Wikipedia (at least ten edits and at least four days of membership) I was able to move the page to the live site.

So here it is – I hope you enjoy reading about St Paul’s church, Stockingford. Hopefully by the time you read this, the page won’t have been deleted by editors.

As with all good wiki pages, there’s more I want to add, and I’m sure the page will be expanded in due course.

Categories: Web Tags: , , , , ,

St Paul’s Church

November 6th, 2010 2 comments

Some time ago, back in 2001, I set up the first website for St Paul’s Church, Stockingford.

There have been a few iterations since then, but today I’m pleased to announce the latest edition.

It has been fully redesigned to include more dynamic elements, provide more useful information, and require less maintenance. It’s based on WordPress, so we (my Dad and I) no longer have to edit static HTML and mess about with FTP.

As before, the website is kindly hosted by Ridgeon Network.

Categories: Web Tags: , , ,

A strange suggestion

October 26th, 2010 No comments

I happened to be looking at the website of a company that offers virtual private servers earlier today. This particular company has a box on their front page with a few questions about what you need your server to do, and it recommends you a suitable server package. But I was slightly surprised at the second-to-last option:

Server sorter

All the other options are sensible, but automated online gambling? I had no idea that there was a legitimate market for such a thing, let alone that a company would risk its reputation by offering a a controversial, although legal service.

Jonathan’s Blog now on new “hardware”

September 3rd, 2010 1 comment

This blog, and my other blogs, used to run on a rather old server: two 1GHz Pentium III processors, 1GB memory and 2 x 18GB SCSI hard drives. I host with Ridgeon Network, which is owned by my friend Chris. I help him out with some networking stuff from time to time so he loaned me this spare server for personal use.

A few weeks back one of the hard drives failed. Service continued as normal but it was an acute reminder that the server was getting old.

Recently Chris bought a powerful server for use as a VMWare ESXi hypervisor, along with a large iSCSI SAN to host all the disk images, and powerful shared MySQL database server. As he was moving lots of his servers from physical boxes to virtual machines, I decided to do likewise.

So this website, and my other sites, are now hosted on a CentOS virtual machine, with their databases on a separate CentOS database server. Given that the load average on the old P3 wasn’t very high I wasn’t expecting a noticeable improvement in performance. But how wrong I was! The site is noticeably faster to load and navigate, and in particular the WordPress management interface is miles faster.

All in all, I’m happy with the new platform. To anyone else considering replacing old servers with a virtualised infrastructure, I say go for it. You’ll save tons of electricity, take up less rack space, pave the way for later expansion (by adding more hypervisors or more disks to the SAN) and have better manageability and backupabilitiy.

Audioboo

July 28th, 2010 No comments

I heard about Audioboo – a sort of Youtube for audio clips – the other day on BBC Click. I decided to give it a go, since I fairly often embed audio clips in my blog, simply by hosting and linking to MP3s and letting the user’s browser handle the playback. This doesn’t always work out for the best.

So here’s my first attempt at uploading content to Audioboo and embedding it in my blog.

Categories: Audio, Web Tags: , , , ,

Newbie’s guide for Linux Apache web servers

June 3rd, 2010 No comments

Today a friend (from a Windows background – still a friend?! :P ) asked me how to go about setting up a LAMP (Linux, Apache, MySQL & PHP) server. I wrote him a few notes, not only on how to configure the LAMP stack, but also on how to configure a Linux system properly from scratch, and how to do so securely. There are millions of guides out there that explain how to serve web pages with Apache, but not many of them explain the basics of setting up a secure system too.

I’ve edited these notes slightly to make them suitable for a wider audience, but in essence it’s the same stuff. Hope it’s useful!

OS installation

I recommend using CentOS. It doesn’t really matter whether you choose 32-bit (i386) or 64-bit (x86_64) but use ideally use 64-bit unless there’s a reason not to.

Boot from the CD or DVD of your choice. It doesn’t matter whether you use the full DVD, or the network install CD.

Choose the text-based installer from the boot prompt by typing linux text. The text installer doesn’t install as much extra rubbish as the GUI installer.

In most cases the default options are good enough. One option you should change is to use an NTP time server. This is especially important with virtual machines, since they suffer badly from clock drift.

Choose a strong root password. You will only need it once again. After that, you won’t even even need it for logging on, so there is no need to pick anything memorable. In fact, you are best off choosing a long, random string of mixed-case letters and numbers.

When it comes to choosing packages, deselect as many of the groups as possible. We will add the packages we need individually later on.

Let the installer run its course, and reboot.

Users and passwords

Upon first boot, log in as root using the password you picked before. Now create new user accounts and set passwords:

useradd yourusername
passwd yourusername

Now for setting sudo access. This is like “run as admin” on Windows. Type visudo. In the text file that opens, read down to the line that says

root    ALL=(ALL)       ALL

Duplicate it twice by pressing yyp. Go into insert mode by pressing i and change the username root to your username. When you are done, hit Esc and type :wq to save and exit. Gotta love vi commands ;)

To disable remote root login via ssh, edit the file /etc/ssh/sshd_config using your favourite editor. If you don’t already have a favourite editor, use vi.

Find the line:

#PermitRootLogin yes

and uncomment it and change the value to no:

PermitRootLogin no

Restart the ssh daemon by doing

sudo /sbin/service sshd restart

From now on you can gain root access by using the sudo command, and you won’t need to log in as root again. Log out now by typing exit and re-login as your own user. Forget the root password forever.

Installing packages

First we add a couple of third-party software repositories that have useful stuff.

sudo rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm

Let’s get rid of the stuff we don’t want or need. There are no doubt more than things that can be removed than I’ve listed here, but they can be removed later.

sudo yum remove bluez* pcsc*

Update the system so you’re sure that that latest versions of all software are installed.

sudo yum update

Now we can install the stuff we want for LAMP!

sudo yum install httpd mysql-server php php-mysql

If you are wanting to use any PHP modules/libraries they can be installed here too, such as the commonly-used graphics library gd.

Services

Let’s start the two daemons for Apache and MySQL, and tell them to start on boot.

sudo /sbin/service httpd start
sudo /sbin/service mysqld start
sudo /sbin/chkconfig httpd on
sudo /sbin/chkconfig mysqld on

Apache in its default state will run out of the box. MySQL just needs a root password setting.

mysqladmin -u root password NEWPASSWORD

From now on it’s advisable to GRANT access to specific users on specific databases/tables. Go read about MySQL users.

Firewall

Let’s assume you want HTTP on port 80 open to the world. Open /etc/sysconfig/iptables for editing, and add this line.

-A RH-INPUT -p tcp -m tcp --dport 80 -j ACCEPT

Save and close, and run this to make the changes live.

sudo /sbin/service iptables restart

Editing configs

The main config file for Apache is at /etc/httpd/conf/httpd.conf. It doesn’t need any changes for basic operation, but if you edit it you need to restart the httpd service to pick up the changes.

If you get serious with web publishing from a LAMP platform, you will probably want to read about name-based virtual hosts.

Adding content

In its basic configuration, you should add PHP scripts, HTML pages and other content like images and stylesheets to /var/www/html/. You do not need to restart the daemon for it to pick up new content.

When debugging pages, you will probably find it handy to refer to the error log, at /var/log/httpd/error_log.

Tip: Open two SSH windows to the server – one for editing stuff, and the other for watching the log scroll by as events occur. Use Ctrl-C to break out of it. Do this:

sudo tail -f /var/log/httpd/error_log
Categories: Guides, Linux, Networking, Web Tags: , , , , ,

A little bit of downtime

May 14th, 2010 No comments

On Saturday 15th May (tomorrow) this blog (as well as my photo blog and the Photo Challenge) will be going down for a while in the afternoon and evening.

I host with Ridgeon Network, owned by my mate Chris. Tomorrow some of the servers are being relocated to a new rack and so will be temporarily offline.

I’ll post again when we’re back online :)

Categories: Web Tags: , ,

servepics.com

March 15th, 2010 1 comment

A while back, my younger brother Edmund wanted a photo blog, just like his big brother’s :)

I set him up with a free subdomain from No-IP. The address used to be edmund.servepics.com. I couldn’t fault the service from No-IP, but unfortunately free domains don’t only attract impoverished teenage photographers. They attract spammers and phishers, too.

As a result, the entire servepics.com subdomain is blacklisted by:

  • MSN Messenger. Sending a message including a link to his blog is blocked for an “unknown reason”.
  • Bristol University’s malicious content filtering.
  • My blogs. Any comments or links from his blog are automatically sent to spam, no matter how many times I mark it as not spam.
  • Everyone’s email servers. Any email from this domain is binned by most email providers.
  • Countless other people and services who don’t like online criminals.

So I decided it was time he became a man, and I signed him up for his own domain. You can now see his photos at www.edmundgazeley.co.uk. Enjoy!

Categories: Photography, Web Tags: , , , , , ,

I didn’t buy that!

March 3rd, 2010 No comments

And hot off the press, another fail entry.

I placed an order with Amazon, and received this confirmation email.

Screenshot - Amazon email

I sure don’t remember ordering an ARRAY(0x6b390274), but hey, if it’s free…

Categories: Fail, Web Tags: , , ,

Web 2.0

December 14th, 2009 1 comment

Today I signed up for Twitter – not for personal reasons but because I needed it for work. Of course I’ve heard about it in the past as the leading micro-blogging service, but it hadn’t interested me in the slightest.

I have used Facebook since its early days (when you could only get in if you had an academic email address!), primarily to keep in touch with friends. When they brought out the status updates feature, I couldn’t see the point. Even less so having something like Twitter that’s purely status updates.

There are so many ways these days to get content out there and onto the web. But I can’t see the point in many of the newer sites.

Facebook

Like I said, I use Facebook as a way to keep up with friends whom I don’t see very often. While I was at school, MSN Messenger was all the rage, but now we’re a bit more grown up we don’t all have time to sit on MSN all night. So Facebook is a convenient way to keep in touch from time to time – given that email is only really used for work these days.

But my only friends on Facebook are friends in real life. I don’t meet people through Facebook. For me, it’s just a direct replacement for emailing friends or chatting on MSN. I don’t broadcast my life to the world. I can’t see why they’d care.

Twitter

Which brings me onto Twitter. I can’t imagine that anyone would be interested in snippets of my daily life. If they’re that interested, they can text me and ask. As I mentioned, I now have a Twitter feed and you can follow me if you want – but I don’t recommend it. I’m not intending to write anything interesting – only to use it for following boring feeds like these from the University of Bristol.

Blogs and websites

I’m more interested in personal websites, often in blog format. Maybe it’s because I used the web for years before these social, collaborative sites popped up, and the only resources available were traditional websites.

I’ve had my own website for over a decade now, in one form or another. When I was a kid, I didn’t have much of interest to say and there was nothing on the site. Nowadays I have two blogs: this one, mainly for technical articles, guides, reviews and so on; and my photo blog where I publish photos that I have taken.

Flickr

I’m a geek, and so I have my own server and I run these blogs from scratch using WordPress. Obviously such an approach isn’t going to work for everyone, which is why I like sites like Flickr. It’s a really easy way to get your work online. I set up my own Flickr page some time ago, before I decided where I was primarily going to host my photos.

As you can see, there’s hardly anything on it and only two comments. I’ve worked a bit harder to promote my official photo blog, which also gives me the freedom to customise it exactly as I want, and here I have had thousands of views of my photos.

In summary

I’m not saying that “Web 2.0” is a bad thing – I’m just saying it only works for me in limited ways.

I want to publish my articles and photos in a more traditional format, and I only use Facebook because most of my mates don’t use MSN any more.