Lighttpd Web Server with PHP Support through Entware

A - For Mipsel devices setup Entware from this guide (see youtube video here)

B - For Arm devices setup Entware-Arm from this guide

Paste this commands in terminal:

opkg install lighttpd php5-cgi lighttpd-mod-fastcgi lighttpd-mod-scgi nano
/opt/etc/init.d/S80lighttpd stop
mkdir -p /opt/etc/lighttpd/conf.d
opkg install wget
rm /opt/etc/lighttpd/conf.d/*
wget -c -O /opt/etc/lighttpd/conf.d/99-rtorrent-fastcgi-scgi-auth.conf http://bit.ly/2LFoKtE
wget -c -O /opt/share/www/index.html http://bit.ly/2kZektt
sed -i "/server.upload-dirs*/cserver.upload-dirs          = ( \"/opt/tmp\" )" "/opt/etc/lighttpd/lighttpd.conf"
/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
lighttpd1

To verify if php is enabled, create an info script

nano /opt/share/www/info.php

Paste this code:

<?php
phpinfo();
?>

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

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

lighttpd-php

 

TO ACCESS THE WEBSITE FROM WAN
--------------------------------------------------------------------------

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 with CTRL-X
chmod a+rx /jffs/scripts/firewall-start

Go to Port Forwarding page http://192.168.1.1/Advanced_VirtualServer_Content.asp and redirect port 80 to 81, after reboot you should have access from wan.

lighttpd-portfw

Video HERE...

youtube

 

Thanks @ryzhov_al & @zyxmon

REVIEW (CLICK ON THE STARS TO RATE!)
4
Sending
User Review
4.5 (2 votes)