Differences
This shows you the differences between the selected revision and the current version of the page.
howto:lighttpd_php 2008/05/10 23:40 | howto:lighttpd_php 2017/09/06 18:38 current | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== HOWTO Build lighttpd ====== | ====== HOWTO Build lighttpd ====== | ||
- | First, set up your [[crosscompile]] toolchain. Download {{:howto:build_lighttpd_pa1.tgz}}. Extract, edit the file to correct the bug in **tar xvfz zips/.tar.gz --> tar xvfz zips/$APP-$APP_VER.tar.gz** and then execute. | + | First, set up your [[crosscompile]] toolchain. Download {{:howto:build_lighttpd_pa1.tgz}}. Extract, edit the file to correct the bug in **tar xvfz zips/.tar.gz --> tar xvzf zips/$APP-$APP_VER.tar.gz** and then execute. |
+ | |||
+ | Quick helper: Also note that you need to create a /zips/ folder (or add it to the above script right after [if ! -f zips ]), otherwise the script breaks | ||
Transfer the result, dns323_lighttpd-1.4.13.tar.gz, to /mnt/HD_a2 and extract it ''lnx_bin/busybox3 tar xvz -f dns323_lighttpd-1.4.13.tar.gz'' | Transfer the result, dns323_lighttpd-1.4.13.tar.gz, to /mnt/HD_a2 and extract it ''lnx_bin/busybox3 tar xvz -f dns323_lighttpd-1.4.13.tar.gz'' | ||
Line 37: | Line 39: | ||
Beginning with 1.5.0, lighttpd depends on glib2. | Beginning with 1.5.0, lighttpd depends on glib2. | ||
- | ===== Note on using port 80 for lighttpd ===== | ||
- | Since the DNS-323 Admin service (webs) uses port 80 in order to use port 80 for lighttpd you'll need to do the following: | ||
- | 1) Modify ligttpd.conf file to include "server.port = 80" | ||
- | 2) Stop the lighttpd service | ||
- | 3) Stop the 'webs' service | + | ===== Notes on using port 80 for lighttpd ===== |
+ | For fun-plug v0.5 click [[http://wiki.dns323.info/howto:ffp#lighttpd_web_server|here]] and look for **Port 80** for fun-plug versions 0.3 & 0.4 see below... | ||
+ | |||
+ | Since the DNS-323 Admin service (webs) uses port 80 in order to use port 80 for lighttpd you'll need to do the following: | ||
- | 4) Start the lighttpd service | + | - Modify ligttpd.conf file to include "server.port = 80" |
+ | - Stop the lighttpd service | ||
+ | - Stop the 'webs' service | ||
+ | - Start the lighttpd service | ||
or use the two scripts below and make sure you put them in ./fun_plug.d/start directory with the correct CHMOD settings so they run automatically. | or use the two scripts below and make sure you put them in ./fun_plug.d/start directory with the correct CHMOD settings so they run automatically. | ||
Line 56: | Line 60: | ||
#!/bin/sh | #!/bin/sh | ||
# | # | ||
- | # This script was modified by Paul Imhof on 2/2/08 as a work around | + | # This script was modified by Paul on 2/2/08 as a work around |
# in getting the admin website off of port 80 and on to port 81 | # in getting the admin website off of port 80 and on to port 81 | ||
# It is used in conjuction with admwebs.sh (created) which is | # It is used in conjuction with admwebs.sh (created) which is | ||
Line 130: | Line 134: | ||
#!/bin/sh | #!/bin/sh | ||
# | # | ||
- | # This script was created by Paul Imhof on 2/2/08 as a work around | + | # This script was created by Paul on 2/2/08 as a work around |
# in getting the admin website off of port 80 and on to port 81 | # in getting the admin website off of port 80 and on to port 81 | ||
# It is used in conjuction with lighttpd.sh (also modified) which | # It is used in conjuction with lighttpd.sh (also modified) which | ||
Line 196: | Line 200: | ||
* A pre-compiled variant can be found {{:howto:dns323_lighttpd-1.4.13.tar.gz|here}} | * A pre-compiled variant can be found {{:howto:dns323_lighttpd-1.4.13.tar.gz|here}} | ||
* lighttpd is also included in [[http://www.inreto.de/dns323/fun-plug/|fonz's fun_plug pack]], a comprehensive fun_plug package that's easy to implement and great for first time users. php is a separate package that can be added easily. Instructions are provided. | * lighttpd is also included in [[http://www.inreto.de/dns323/fun-plug/|fonz's fun_plug pack]], a comprehensive fun_plug package that's easy to implement and great for first time users. php is a separate package that can be added easily. Instructions are provided. | ||
+ | |||
+ | |||
+ | ===== Lighttpd for Windows Users ===== | ||
+ | |||
+ | |||
+ | if you don't speak linux gibberish: | ||
+ | |||
+ | Before you begin: | ||
+ | |||
+ | Install Putty on your PC: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html | ||
+ | |||
+ | Install Netscan on your PC: http://www.softperfect.com/products/networkscanner/ | ||
+ | |||
+ | Run Netscan. click the Options tab, then the Additional subtab. Click all the buttons. in the box on the bottom type 22, 23, 80, 443, 8080. Click OK. | ||
+ | |||
+ | Click the IP box, then click the range of your network in the box that pops up. | ||
+ | |||
+ | these files must be in these locations in Volume_1 of the DNS-323: | ||
+ | |||
+ | //lighttpd.sh in /ffp/start// | ||
+ | |||
+ | //lighttpd.conf in ffp/etc/examples// | ||
+ | |||
+ | these files are installed by default when fun plug runs the first time | ||
+ | |||
+ | Create these folders: | ||
+ | |||
+ | //Volume_1/www// | ||
+ | |||
+ | //Volume_1/www/logs// | ||
+ | |||
+ | //Volume_1/www/pages// | ||
+ | |||
+ | Run Putty. You will get a black box with an octet: # and a green cursor. you will enter the commands below at the green cursor. the octet is shown as a | ||
+ | |||
+ | reference point. | ||
+ | |||
+ | this command will copy the lighttpd configuration file /examples to ffp/etc: | ||
+ | |||
+ | **# cd /ffp/etc** | ||
+ | |||
+ | **# cp examples/lighttpd.conf /ffp/etc/lighttpd.conf** | ||
+ | |||
+ | this makes the lighttpd shell file in the /ffp/start directory executeable: | ||
+ | |||
+ | **# cd /ffp/start** | ||
+ | |||
+ | **# chmod +x lighttpd.sh** | ||
+ | |||
+ | it will not start if lighttpd.conf is not in /ffp/etc | ||
+ | |||
+ | to manually start lighttpd: | ||
+ | |||
+ | **# sh /ffp/start/lighttpd.sh start** | ||
+ | |||
+ | If it's running you will see port 8080 open on your DNS-323 when you Start Scanning in Netscan | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Lighttpd with SQLite ===== | ||
+ | |||
+ | Update extensions path in php.ini to point to '/ffp/lib/php/extensions/no-debug-non-zts-20 | ||
+ | 060613/' | ||
+ | |||
+ | ==== Installation of SQLite ==== | ||
+ | |||
+ | |||
+ | * wget http://www.inreto.de/dns323/fun-plug/0.5/packages/sqlite-3.5.6-3.tgz | ||
+ | * funpkg -i sqlite-3.5.6-3.tgz | ||
+ | |||
+ | |||
+ | ==== Configuration of PHP ==== | ||
+ | |||
+ | * Add some lines to /ffp/etc/php.ini if you need support for SQL in PHP (Create file if needed): | ||
+ | ''[PHP]\\ | ||
+ | extension=pdo.so\\ | ||
+ | extension=pdo_sqlite.so\\ | ||
+ | extension=sqlite.so'' | ||
+ | * Restart ligthttpd (As root): | ||
+ | ''/ffp/start/lighttpd.sh restart'' | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ |