Web Server Ubuntu 9.10

So I thought I would write up a tutorial on how to install a web server that will support Apache, PHP, and MySQL. I will go over some configuration file adjustments as well. So lets get into this and lets open up your terminal and do the following:

john@jcwebconcepts.net:~$ sudo taskel install lamp-server

Now during this process you will be asked a few things. You will be asked for a MySQL password. The password you will set will be your root users password. When it is installing PHP it might ask you what type of module do you want to install for. You will want to select Apache2. This will take a few minutes to install. Once done you can open up your web browser and put in the address bar the IP address of your web server. Now lets edit the default file for your website.

john@jcwebconcepts.net:~$ sudo vim /etc/apache2/sites-available/default

        # If this is going to be internal only then you can leave this alone
        ServerAdmin webmaster@localhost
        # Now you need to add the following line. If this will be internal then put internal
        # IP. If this will be external then you would either put domain name or outside IP
        # Because you server will support PHP we need to setup a directory index
        DirectoryIndex index.php index.htm index.html
        DocumentRoot /var/www
                Options FollowSymLinks
                AllowOverride None
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
    Alias /doc/ "/usr/share/doc/"
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128

The directory index basically tells the server what files to look for in one is not specified. For example if I do http://www.jcwebconcepts.net/ the server will look in the server root directory for the following files: index.php index.htm index.html. If they do not exist you will get an error. And that is it for setting up your own web server in Ubuntu 9.04. I have tried this in the alpha 9.10 and it works as well.

[embedyt] http://www.youtube.com/watch?v=J8y51yESHyU%5B/embedyt%5D

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s