Nik's Technology Blog

Travels through programming, networks, and computers

Apache Web Development Testing Server Set-up

I've been setting up an Ubuntu linux machine for web development testing on my local network, but because the machine has only one IP address assigned to it I wanted a solution to be able to serve more than one website without changing the config in Apache each time.

One method would be to use a separate folder for each site but .htaccess rewrites don't work properly using this method and if you write hyperlinks that refer to the root of the site (i.e /contact.php), this can cause issues too.

Anyway, I thought of using different port numbers to distinguish the different testing websites. So one site maybe on 192.168.0.1:2000, another on 192.168.0.1:2001 etc...

You set this up in Ubuntu as follows:

Open a Terminal prompt and type:

sudo gedit /etc/apache2/ports.conf

Enter your password and then for each port number you require add a Listen statement on a new line. So your file should look like:

Listen 80
Listen 2000
Listen 2001

<ifmodule>
Listen 443
</ifmodule>

Save the file and then go back to the Terminal and type:

sudo gedit /etc/apache2/sites-available/default

In this file you should find a <virtualhost *> tag followed by various commands. You need to copy and paste everything from <virtualhost *> to </virtualhost> onto a new line below.
Then rename the first <virtualhost *> to <virtualhost 192.168.0.1:80> where 192.168.0.1 is the IP address of you machine. Rename the second virtual host to <virtualhost 192.168.0.1:2000> and repeat for as many websites you want to set-up.

Then for each Virtual Host you'll need to change the DocumentRoot to the file path to each website on the local machine.

Once this is done you'll need to restart Apache to see if your changes have been successful. To do this type the following into the Terminal:

sudo /etc/init.d/apache2 restart

Time to start testing your websites in Safari on Windows?

Apple recently added their Safari web browser to the Apple Software Update and pre-checked the box by default. This effectively means that a lot of Windows users will now, possibly without knowing it, have installed Safari.
I'm not going to discuss the ethics of this practice here, instead read John's Blog - CEO of Mozilla.

But what it means for the humble web designer or developer is that we should really be installing Safari on our Windows machines and adding it to the list of browsers we test our sites against as the number of users is bound to increase as a consequence.

Apple pushed Safari web browser through their Apple Updates service

Competition in the browser business is good and over the last few years Firefox has begun to gain ground on Microsoft's Internet Explorer domination. It has also forced the browsers to become more standards compliant, thereby helping web developers and designers design cross-browser, cross-platform web pages.

According to Apple, Safari is a standards compliant browser built on the open source WebKit project, so hopefully if your pages have been built to W3C standards they will require minimal checking, but it is always wise to test. Apple have a range of web developer resources for the Safari browser, including the Safari CSS support, Safari developer FAQ, and a general web development best practices guide.

Product Review: Train Signal's IIS Web Servers CBT Video Training

As an ASP.NET web developer, I think it's important to understand and know how to configure Microsoft's web server, Internet Information Services (IIS). Depending on the organisation you work for you may or may not get the opportunity to tinker with IIS, but this shouldn't stop you from learning the basics.

You could go out and buy a book on configuring IIS and then install IIS on your computer to practise what you've read, but thanks to the guys at Trainsignal.com who have kindly sent me some of their training videos, I've discovered a much easier way of learning.

Train Signal CD-ROM

Train Signal provides video training courses for Microsoft, Cisco and CompTIA certifications, including CCNA, A+, Network+.
I'll also be reviewing the Cisco CCNA training videos here soon.

Train Signal's IIS Web Server video training covers both IIS 5 and IIS6, and features topics including installing IIS, creating test websites, hosting more than one website using host headers, adding security, setting up an FTP server, and web server optimisation.

Train Signal CD-ROM menu

The course is taught by Scott Skinger, President and founder of Train Signal. Scott has many years of experience in the IT field, holds various IT certifications and is a competent instructor. The videos are easy to follow and Scott's narration is second to none.

Train Signal lab book sample

The series of videos are backed up with a written guide in the form of the lab book, which comes as a printable PDF on the CD ROM, this goes through the same steps featured in the videos and includes network diagrams like the one above to help you set-up your own lab.

Train Signal video player

If you want to get up to speed on a particular Microsoft product, obtain an IT certification or you don't like reading IT text books then I definitely recommend you give these training videos a try.

Course Contents in full:

Introduction
Lab Setup
Setting up the lab
Computer 1
Computer 2
Computer 3
Lab
Scenario
Installing IIS on Windows 2000 Server
Creating an HTML file
Hosting Ben & Brady's site
Configure DNS so Internet users can find your website
Testing the website from the client
Lab
Scenario
Creating a test website using an HTML file
Creating an additional website on the web server
Creating host headers
Configuring DNS for the second website
Test and view website from client
Assigning site operators
Adding security to a website
Test and view the website from a client
Lab
Scenario
Downloading and installing service packs and hot fixes
Setting NTFS permissions
Disabling Netbios over TCP/IP
Download and run The IIS lockdown tool from Microsoft
Enable and view logging

Wingdings and Webdings Character Reference

Here's a useful reference to Wingdings and Webdings character sets. I find these characters are sometimes useful in design, especially using a tool such as Adobe Fireworks.

Use them as starting points for creating icons. The trick is to use the "Convert to paths" option in the "Text" menu of Fireworks, this converts the font character to a vector image which you can tweak to you're hearts content.

Use this chart as a quick reference to get the image you're after.

Webding and Wingdings caharacters

Product Review: uCertify PrepKit Exam Simulator

I was kindly sent a uCertify PrepKit for review back in December last year for the Microsoft C# .NET 2.0 Web-based Client Development exam (70-528). I'm looking to take the Microsoft MCTS .NET Framework 2.0 Web Applications certification this year, and needed an exam simulator and part of my study.

uCertify start-up logo

I've been so busy lately its been difficult to find the time to sit down and put the exam simulator through its paces. Anyhow I've spent a good few hours testing my .NET knowledge with this PrepKit to allow me to confidently evaluate it.

The PrepKit features a bunch of questions that closely follow the style of questions featured in the Microsoft exam, obviously the PrepKit does not contain real exam questions, but uCertify claim they are "realistic", and they are supposed to get you used to the kind of questions you should expect to see when you come to take the real exam.

uCertify PrepKit main menu

The tests in the PrepKit contain between 15 and 40 questions each and you’re given 120 minutes to complete each one, but I found that choosing a shorter time and reducing the amount of questions I needed to answer allowed me to spend more time using the PrepKit, because I don’t often have 2 hours of uninterrupted revision time.

There are two different modes to choose from before starting a test. Learn mode and Test mode, Learn mode allows you to get feedback on the current answer immediately whereas in Test mode you can only review the answers at the end of the practice test.

uCertify PrepKit test question page

When you complete a test you can review the questions and go back and look at any questions you may have answered incorrectly. You can also choose to re-take just the questions you got wrong. When you re-take the test the multiple choice answers change order to keep you on your toes!
During a test you can pause the timer to take a call, make a coffee etc, tag, print, review and bookmark questions.

uCertify PrepKit test history page

Every test you take with the PrepKit gets recorded in the Test History section, from here you can go back and review all the practice tests you've taken, review all the questions you got wrong, re-do the whole tests or re-do only the questions you got wrong.

Custom tests can also be created to turn your weaknesses, based on your test history or certain topics into your strengths.

Besides the practice tests the PrepKit contains study notes, quizzes and tips and flash cards to help assist you in understanding the topic.

MS Visual Web Developer 2008 Express Removes Support for Mobile Forms

I recently downloaded Microsoft's new Visual Web Developer 2008 Express Edition, which is a cut-down free version of Visual Studio aimed specifically at ASP.NET web developers. It supersedes the last version (VWD 2005) and adds new functionality.

I didn't remove the old version before installing, and in doing so noticed, and was able to verify (with screen shots below) that support for building mobile websites has been removed in the latest version, at least that's what appears to have happened!

Visual Web Developer 2005 - Add new item dialog box
Visual Web Developer 2005 - Add new item dialog box

Visual Web Developer 2008 - Add new item dialog box
Visual Web Developer 2008 - Add new item dialog box

Request a web page using HTTP and a Telnet session

Ever wanted to be a real web geek?
Well, you can get one step closer by following these steps and browse a website using a Telnet session via the Windows(R) DOS terminal.
Believe it or not you can actually use this method to diagnose HTTP issues, and it also provides an insite into how the HyperText Tranfer Protocol (HTTP) works.

HTTP Request using Telnet

  1. Open a DOS prompt by clicking Start > Run and typing CMD and hitting Enter.
  2. Clear your screen of commands by typing CLS and pressing Enter.
  3. Start a Telnet session by typing telnet and pressing Enter.
  4. Configure the Telnet session to echo typed characters to the screen by typing set localecho.
  5. Instruct Telnet how you want to handle the Enter key by typing set crlf.
  6. Open up a connection to the site you want over HTTP port 80, by typing o nikmakris.com 80.
  7. Press Enter several times until the cursor lands on an empty line and then request a page from the site.
  8. Type the following carefully without making errors:

GET / HTTP/1.1
Host: nikmakris.com

  1. Then press Enter twice and you should receive the HTML response for the page you just requested from the web server, delivered to you by HTTP!

Here's what you should have typed, and the response from the DOS terminal and Telnet session. I've ommited the verbose HTML response from the web server.


Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Microsoft Telnet> set localecho
Local echo on
Microsoft Telnet> set crlf
New line mode - Causes return key to send CR & LF
Microsoft Telnet> o nikmakris.com 80
Connecting To nikmakris.com...
GET / HTTP/1.1
Host: nikmakris.com

Book Review: Prioritising Web Usability

I can't recommend this book enough. A lot of the topics covered in this book are common sense. As a Web developer or designer you may think you create very usable sites already, but even if this is true, and you are a true usability guru, a lot of the facts and statistics in this book are useful for backing up your views, and getting your point across to clients who insist on functionality that you know full well will break usability conventions, and potentially harm their finished Web site.

The book is for people who have business goals for their Web sites or the Web sites they work on. This includes sites that match the following criteria:

  • E-commerce sites
  • Corporate sites
  • News sites
  • Non-profit organisations
  • Government agencies

If you are trying to get users' to accomplish something when they visit your site then you should be concerned about usability.

This book contains the results of many studies into how people behave on the Internet and consequently what makes Web sites succeed or fail.

This book alone is not enough to ensure your site will be the most usable it can be, but it is crammed full of tips and real world examples of what to do, and what not to do when it comes to designing Web user interfaces, writing Web copy and planning your Information Architecture. Ideally you will need to perform usability testing as well, but the information in this book will significantly help in improving your Web site.

The book begins by explaining how people use the Web and how to optimise your site accordingly. It explains how users' use search engines to find answers to problems, and how to improve your site to cash-in on these users.

Nielsen and Loranger then go back to the usability problems they found back in 1994 and discover what significant usability issues are still relevant today, including bugbears such as:

  • Breaking the back button
  • Pop-ups
  • Flash
  • Uncertain clickability
  • Plug-ins
  • Splash pages

The forth chapter helps you prioritise your Web site usability issues and decide what to tackle first. They do this by categorising usability problems by severity, frequency, impact and persistence.

Site search engines and their user interfaces and results pages (SERPS) are covered next, including a brief introduction to Search Engine Optimisation.

Chapters 6 and 7 concern navigation, information architecture, readability and legibility. This is followed by a chapter on how important it is to specifically write for the Web, using summaries for key points, and by using simple language. The importance of knowing your audience and how people skim read articles on the Web is talked about, as is the use of marketing slogans and hype.

The following chapter is geared towards your e-commerce goals. How to provide good product information and win consumer confidence in your site and product to increase and promote sales.

The penultimate chapter looks at presentation and users' expectations, while the final chapter in the book is all about balancing technology with people's needs. This covers the use of multimedia content such as videos and the use of familiar interface conventions in Web design.

Prioritizing Web Usability
By Jakob Nielsen and Hoa Loranger
Published by New Riders
ISBN 0-321-35031-6

 

Font and Text Styles for Websites

People find reading text on screen much more difficult than reading on paper, by following some simple guidelines web designers can help make this as painless as possible.

Due to the nature of how web browsers render textual content on the screen; using the fonts installed on the client machines, it severely limits the font variation web designers have at their disposal.
Most browsers will be able to render the following fonts without reverting to a default alternative:

  • Arial
  • Georgia
  • Verdana
  • Arial Black
  • Times New Roman
  • Trebuchet MS
  • Courier New
  • Impact
  • Comic Sans MS

I personally stick to the top 3 fonts in this list as they are very readable on-screen and are the most professional; avoid Comic Sans MS and Courier New.
It is also possible to specify alternative fonts in your CSS style sheets for the browser to use if your font of choice isn't available.

Once you've chosen a font for a website use that font throughout to maintain consistency. Websites that use too many fonts sprinkled through their pages look unprofessional. Verdana is the most readable font even at low point sizes.

Maintaining Readability

To increase a sites' readability you should focus your attention on three things:

  1. Choose a good font and a decent readable default font size.
  2. Make sure the text and background contrast in colours is high.
  3. Avoid using all capitals in blocks of text and headings.

Text in Images

Some web designers get around the font support problems mentioned above by creating a bitmap image of all headings, titles etc. Although this method does allow you to use any font your graphics program supports, including anti-aliased (smooth-edged) fonts, it causes a big accessibility and SEO problems. You should only use this technique for a company logo, all other textual information should be actual text in your HTML.

IIS 7 and Configuration Delegation on Shared Servers

I've just been watching the IIS 7.0 episode of the .NET Show. One of the new exciting features of IIS 7.0 for people who run their sites on a shared hosting environment are the new Delegated, Remote Administration options.

Essentially this will allow developers who do not have access to IIS on the box to use an IIS client tool to configure their site remotely over HTTP. This obviously relies on the hosting company to offer this functionality.

This has been a major bugbear for developers running their sites on IIS in the past in a shared environment. If set-up correctly it should allow hosting companies to save time and money by delegating some IIS functionality out to the site administrators.

I've recently moved hosting companies in order to get ASP.NET and the .Net framework 2.0, and I think that it will be big selling point for hosting firms. As far as I'm aware you will need Vista or Longhorn server to get IIS 7.0 however, so we may not see hosting companies offering this for a while yet.