SkaterMark

Mark Warner's Personal Blog

  • Ice Skating
  • Travel
  • Photography
  • Technology
  • Blog
  • About

Apache2 Configuration

Posted on 12th May 2009 Written by Mark Warner

After much frustration trying to get Apache to run corectly under EeeBuntu (Ubuntu based Linux distro) I finally discovered that the solution was actually a simple one.

Apache ran fine, and MySQL, PHPMyAdmin and PHP5 were all installed and working correctly.  However it was not possible to place a web site into a folder location within my /home/myuser/www folder.

The steps to solve this were actually very simple:

1 – create the www folder and create a dummy index.htm page to test the site with.

2 – Create a new Virtual Host by using terminal to issue the following commands – changing your site name and user folder as necessary.

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite

gksudo gedit /etc/apache2/sites-available/mysite

change DocumentRoot line point to /home/myuser/www

change Directory line to point to /home/myuser/www

3 –  Ensure the user account folder can be accessed by Apache by changing the permissions.

chmod +x /home/myuser

4 – Secure Apache

gksudo gedit /etc/apache2/ports.conf

change the Listen line to read

Listen 127.0.0.1:80

5 – Enable your new site usinge:

sudo a2ensite mysite

6 – Change folder permissions to ensure the home folder and the user home folder can be browsed by other users, else Apache will return messages about files not found.

7 – Restart Apache

sudo /etc/init.d/apache2 restart

8 – Test your new site http://localhost/

Filed Under: Technology

About Me

This web site is my place to share news of my ice skating, travels and other personal news, including charity runs & Movember. There are also a few tutorials on various technology subjects in the hope that someone else may find them useful.

Recent Posts

  • Oberstdorf 2018
  • Skate Berlin Adults 2018
  • Juna Cup 2018 – Tallinn, Estonia
  • PiBear – Part 2
  • PiBear – Raspberry Pi powered Winnie the Pooh (Part 1)

Categories

  • Ice Skating
  • Personal Blog
  • Photography
  • Technology
  • Travel

© Copyright 2016 Mark Warner · All Rights Reserved

www.atlantisweb.co.uk · www.skatermark.co.uk · www.mark-warner.co.uk