THTTPD
From WL-HDD Wiki
| WL-HDD Contents |
|---|
| What is the WL-HDD |
| Features |
| Pro's/con's |
| Reviews |
| Hacking |
| Inserting the HDD |
| Hacking Guides |
| Basic setup guides |
| Packages guides |
| Requests |
| Troubleshooting |
| This Wiki |
| Credits |
| Editing help |
| Contact Me |
Prerequisites
To complete this guide, the following is assumed:
| You are running Oleg's firmware (1.9.2.7-6b or later) |
| You have harddisk partitions up and running with an extended filesystem mounted to /opt |
| You have installed the Ipkg package system. |
| You have configured your partitions to automount. |
Installing THTTPD
First, we need to install the ipkg package
/opt/bin/ipkg update /opt/bin/ipkg install libstdc++ php-thttpd
Configuration
Whilst you can store your web pages anywhere on the WL-HDD, for the purposes of this guide, the folder /opt/share/www will be used.
Lets make that folder
mkdir -p /opt/share/www
Now lets edit the configuration file for thttpd
nano /opt/etc/thttpd.conf
Change the contents of the file to the following
dir=/opt/share/www port=81 user=nobody nochroot nosymlink novhost logfile=/opt/var/log/thttpd.log pidfile=/opt/var/run/thttpd.pid
Save and exit nano
Ctrl + O Ctrl + X
THTTPD needs a couple of folders creating to allow it to run, lets make them
mkdir -p /opt/var/log mkdir -p /opt/var/run
Lets make a little test page so that we can check that the server is working
echo "Hello World" > /opt/share/www/index.htm
Reboot the WL-HDD
reboot
Your Webserver is now accessible on the LAN by typing in
http://192.168._._:81 (ip address of your WL-HDD with the port number 81)
You should see the text "Hello World" displayed. To make your webserver accessible from external computers, follow the THTTPD from WAN guide
