NSLU2

tech
top
Index
1 Introduction
2 Installation
3 DNS/DHCP server
4 Installation of Apache
5 An NFS server
6 Installing a mailserver
7 Alternatives
8 Sane remote scanner
9 problems
\"cover\"

Previous: 3. DNS/DHCP server Index Next: 5. An NFS server

4. Installation of Apache

Installing and configuring a webserver is a bit more complicated. The reason is, that Apache2 is becoming more sophisticated, and therefore less suitable for simple webpages. But Apache still is the standard. So here we go.

Installing is easy; apt-get install apache2

4.1. Configure a simple website

What I basically did is put a file 000-default in /etc/apache2/sites-enabled with the following content:
NameVirtualHost *
<VirtualHost *>
        ServerAdmin webmaster@localhost
        DocumentRoot /home/www/html/
        <Directory />
                 Order Deny,Allow
                 Deny from all
        </Directory>
        <Directory /home/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                RedirectMatch ^/$ /ljm/
        </Directory>
        ScriptAlias /cgi/ /home/www/cgi/
        <Directory "/home/www/cgi">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        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
</VirtualHost>

I also created the site:
mkdir /home/www
mkdir /home/www/html
mkdir /home/www/html/ljm
mkdir /home/www/cgi
chmod -R a+rx /home/www /home/www/html /home/www/cgi

and in /home/www/html/ljm I put a index.html with some happy message.

And that seemed to work.

4.2. Other webserver-stuff

If your webserver needs to display only static pages, this is enough. I wanted more.

First is webmail. I have my own mail server at home, so I want to be able to access my mail via the Internet. So I use squirrelmail. It requires php5, which is installed with apt-get.

Next is the posibility to display my photos. The simplest is Simpleviewer There are other flashes on that site that look nice as well. I'll try them another time.

Previous: 3. DNS/DHCP server Index Next: 5. An NFS server