Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Lighttpd web server with PHP support through Entware

TeHashX edited this page Oct 13, 2014 · 20 revisions

We need a usb-flash formatted EXT2 or a usb-hdd formated EXT3, will not work fine on FAT32 or NTFS.

First, setup Entware from this guide.

Login to router with a terminal like putty and enter this commands:

opkg install lighttpd
opkg install php5-cgi
opkg install lighttpd-mod-fastcgi
/opt/etc/init.d/S80lighttpd stop
rm /opt/etc/lighttpd/lighttpd.conf
wget -c -O /opt/etc/lighttpd/lighttpd.conf http://tinyurl.com/amvkxt3
wget -c -O /opt/share/www/index.html http://tinyurl.com/bxfxpq6
wget -c -O /opt/share/www/test.php http://tinyurl.com/b9b34kp
/opt/etc/init.d/S80lighttpd start

Go to 192.168.1.1:81 and if you see this page, the lighttpd web server is configured correctly

if

Go to 192.168.1.1:81/test.php and if you see this page, the php-mod-fastcgi is configured correctly

php

###TO ACCESS THE WEBSITE FROM WAN

opkg install nano
nano /jffs/scripts/firewall-start

Paste this lines

#!/bin/sh
iptables -I INPUT -p tcp --destination-port 81 -j ACCEPT

Save with CTRL-O / Enter / and exit nano with CTRL-X

Give right permission

chmod a+rx /jffs/scripts/firewall-start

Go to [192.168.1.1/Advanced_VirtualServer_Content.asp](Port forwarding page) and redirect port 80 to 81, after reboot you should have access from wan.

wan

Youtube video here

Post issues here

Clone this wiki locally