Configuring Apache on your Ubuntu LAMA Server for websites


This is part of the LAMA – Best of all worlds tutorial
LAMA Tutorial Home Page

Apache Web Server

During your install of Ubuntu 8.04 server, one of the install options was LAMP Server.  This installs Apache, Mysql and PHP. 

To setup Apache, we will adding a file to the apache sites-available directory on the LAMA server.

To get started:
Use Putty to connect to your LAMA server.

1.) Change to the Apache sites-avaliable config directory

cd /etc/apache2/sites-available

2.) Add a file for your site

sudo pico testsite

3.)Pico will open a blank file.  Add the following to create a configuration entry for your site.

    Listen 81
    NameVirtualHost *:81
    <VirtualHost *:81>
    DocumentRoot /asp_net/testsite


This is a simple config, for more extensive configuration options, please see Apache’s Web site.

Apache will listen for requests on port 81, and will look in your asp_net folder.

4.) Now tell apache to load that site into its config.

sudo a2ensite testsite

This makes a link to this file, and puts it into the sites-enabled directory.

5.)Reload Apache

sudo /etc/init.d/apache2 force-reload


Testing it out:

Now from your browser type:

http://{your LAMA server IP address}:81


You should see your site in Apache!


Next .. Getting your Asp.Net Mysql Setup

Author: Nick Jolin

My name is Nick Jolin and I'm a full time entrepreneur making a living by creating wonderful tools that help people with online marketing. Connect with me on Google+

Leave a Reply

Your email address will not be published. Required fields are marked *