One thing DD-WRT can do, which is under-stated, is serve web pages (internally) via it’s built-in HTTP server. This post will demonstrate how to set it up with a simple static page which displays “Hello Home!” In another post I’ll show how to make something pretty useful with it. Stay tuned!
Before this will work and be of any use, the following must be enabled. If yours are not, enable them, then reboot the router.
a) JFFS. See my post on enabling JFFS if you need help.
b) Web Info Status page.
Storage and Access
After reboot, /www/user will be symlinked to /tmp/www. The static page will be served from this location. The access URL will be: http://router_address/user/static.html
-Login to the router as root via ssh.
-Change directory: cd /jffs/bin
-Edit the startup script (if you don’t have one, create it – boot_set.sh). Add the following to the start of the file. This will copy the html file from the storage location to the serving location. to the html file we are going to serve:
# Copy static web page to serving location
cp /jffs/etc/static.html /tmp/www/static.html
-Change directory: cd /jffs/etc
-Now create the static page “/jffs/etc/static.html” with vi:
<meta http-equiv="Content-Type" content="text/html" />
<title>Static Intranet Web Page Test</title>
-Login to the routers web admin page and navigate to Administration > Commands.
-Enter “/jffs/bin/boot_set.sh” in the Command Shell/Commands section.
-Click the “Save Startup” button.
-Reboot by navigate to Administration > Management and click “Reboot Router” from the web interface.
At this point the URL should be available and you should be able to bring up the page from a browser: http://router_address/user/static.html
Stay tuned to see how you can utilize this in a very useful way!