AndyHat Consulting

Site News

Setting up a web folder

This tutorial follows on from the setting up a development server tutorial and we ill be making a folder to contain our websites. Steps 1 and 2 are required while steps 3 and 4 are only required if using a linked folder like in the installing XAMPP on Unbuntu tutorial. The use of virtual servers will be covered in the next tutorial.

Step 1 Creating the folder

Open the terminal from the launcher or by pressing Ctrl-Alt-t. To create a websites folder in your home folder by typing the following in the terminal.

mkdir websites

 Step 2 Change the permissions

During the setup of the web-server a new user /group that is used by the webserver. So that the webserver can use and run code from our new websites folder we need to change the permissions on the websites folder so the Apache servers group becomes the owner. By default the Apache server creates an uses the www-data group.

To change the folder permissions so that the www-data group has ownership of the websites folder you need to type the following in the terminal

sudo chown -R :www-data websites/

If asked for the root password please enter your password.

 Step 3 Creating a link to the folder (Optional)

There are 2 ways to run the development webserver. The first uses sub folders of your localhost the second uses Apache virtual hosts.

For this step we are creating a symbolic link to our new websites folder from /var/www. Please type the following commands in the terminal.

cd /var/www
sudo ln -s /home/[username]/public_html ./[username]

A good description of the difference between symbolic links and hard links

http://www.cyberciti.biz/tips/understanding-unixlinux-symbolic-soft-and-hard-links.html

Step 4 Creating a Test Page (Optional)

Place a test web page called index.html in the new websites folder

In your favorite editor enter the following text and save it a index.html in the websites folder.

<html><body><h1>Well done!</h1>
<p>This is web page in your websites folder.</p>
</body></html>

Now in your web brower’s address bar type:

localhost/[username]/websites/index.html

You should now see the friendly “Well Done!” message.

What next?

The next tutorial will cover setting up virtual servers in Apache and using the hosts file to re-direct addresses.

Photographic prints gallery added

I have just added a gallery of my photographic work that has been printed and is for sale. The gallery will be updated with information on whether the prints are mounted or framed.

Website check-list

As part of the “So you want a website” course I’ve been writing, I’ve created a simple Website check-list. It’s for anyone that is thinking of getting a website. The aim of the check list is to help you get the basic information that any web developer will need to know and to get you thinking of want you want from your new website. It covers everything from who you are and what you do to how the website should look and what it should do.

If you have problems with this check list then you need to go on my course to discover how to get the best from your web developer.

Photography on wheels goes live.

I have spent the last few weeks completely rebuilding my photography website called Photography on Wheels . The aim was to make it a smarter more interactive website that better show my photographic work. I  am pleased to announce that earlier this week I finally got the new website live and working with a range of web browsers and screen sizes.

The previous website needed to be updated as it used Gallery 2 software that is not supported. I investigated the option of trying to upgrade to Gallery 3 but found that there was insufficient documentation to make my own theme and it would only do part of the required job. I therefore decided to make the entire website using the very powerful and easy to configure zenPhoto system. The feedback I have so far has been very positive.

New Website

After many months work my new unified website is now live. The website has been re-designed to cover all aspects of my work and make it easier to use.

While designing the new website I decided to make use of the latest HTML 5 and CSS 3 web standards to produce a smarter more interactive website.

 

Blog Archive

Site News