NSLU2-Linux
view · edit · print · history

OpenWRT.UseHttpdForOwnServerAndWebif History

Hide minor edits - Show changes to markup

January 23, 2009, at 05:05 PM by AdamBaker -- Initial description
Added lines 1-23:

Use httpd to server your own pages and the Webif Administration Interface

If you install the webif package to allow web based management of your OpenWrt based box but would also like to use it to serve your own web site then you can, with some careful configuration, make that work.

The first thing you need to do is modify /etc/httpd.conf and change the first 2 lines to

 /cgi-bin/webif:root:$p$root
 /cgi-bin/webif:admin:$p$root

which makes only the webif pages password protected. You may also want to extend the list of MIME types, for example some of my pages use capitals for the .JPG extension on pictures so I had to add that.

After doing that you need to type

 /etc/init.d/httpd restart

for your changes to take effect.

Next you need to replace the home page (/www/index.html) with something that doesn't auto-redirect to Webif. It's up to you whether you include a link to webif on that page or if you want administrators to have to know the link (http://yourslug/cgi-bin/webif/info.sh)

Finally, the /www directory that is the web root is on the flash so you don't want to store loads of pages there. If you plan to put a lot of data on your web site create a symbolic link there to the data on another partition, e.g.

 ln -s /space/public/photos /www/photos
view · edit · print · history · Last edited by AdamBaker.
Originally by AdamBaker.
Page last modified on January 23, 2009, at 05:05 PM