CHEROKEE web server through optware

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

• To start the optware environment:
• Login to router with putty terminal
• go to http://192.168.1.1/APP_Installation.asp and install Download Master (uninstall or disable after, if you are not using it)

ipkg update
ipkg upgrade
ipkg install php-fcgi
ipkg install cherokee
ipkg install cherokee-admin

• In your favorite internet browser type 192.168.1.1:8008 and should see this webpage:
cherokee

If you have already a website created, just copy it to /opt/share/www/cherokee but first set write permission to folder:

chmod 777 /opt/share/www/cherokee

If you don't have a website, a good start is to download a template from web, like one from this site www.htmltemplates.net
Edit with your favorite HTML editor and publish.

To enable PHP support:

cherokee-admin -b

This will give you a one-time password
• Go to 192.168.1.1:9090 and type username admin and paste the password from terminal
cherokee-admin
• Go to Sources
• Click on + sign to add new Information Source
• Nick - PHP-Interpreter
• Connection - 127.0.0.1:47990
Add
• Change type from Remote host to Local interpreter
• Interpreter /opt/bin/php-fcgi -b 127.0.0.1:47990
• Press ENTER
SAVE on upper right
Graceful restart
• Click on Home and start server if is stopped
• Go to vServers
Behavior
Rule Management
• Click on + sign to add a Behavior Rule
Languages
PHP
Add
Create
SAVE on upper right
Graceful restart
• Click on Home and start server if is stopped
To verify if php is enabled we will create a test page:
• open another putty sesion because the first one is busy with cherokee-admin

ipkg install nano
nano /opt/share/www/cherokee/test.php

Paste this code:

<?php
phpinfo();
?>

• Save with CTRL-O / Enter / and exit with CTRL-X
• Go to 192.168.1.1:8008/test.php and if you see an info page, the webserver is configured correctly.
cherokee-php
For starting webserver automatically on every router reboot:

app_set_enabled.sh cherokee yes

If you want acces from wan to website and cherokee-admin:

nano /jffs/scripts/firewall-start

Add this lines:

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

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

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

Make script executable

• Go to port forwarding and open this two ports like in the screenshot, then press Apply
cherokee-port
Now just type your_wan_ip adress in browser and should see your webpage
If you have dynamic ip, better set a dynamic dns

Youtube video HERE

youtube

 

Source: http://vip.asus.com/forum

Thanks @Leon

Get Email Notification When a Server or Port is Unreachable
SoftEther VPN Running on AsusWRT Routers
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Spreed WebRTC server and web client
Asterisk VoIP Server running on AsusWRT Routers
Get Email Notification When a Server or Port is Unreachable
SoftEther VPN Running on AsusWRT Routers
NZBGet through Entware
Minidlna UPnP Media Server through Debian Jessie Arm

SUBSCRIBE

To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...