User Tools

Site Tools


modifications:lighttpd_051

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
modifications:lighttpd_051 [2015/12/09 22:55]
matthias removed
— (current)
Line 1: Line 1:
-====== Modifications for lighttpd - Piratebox version 0.5.1 and 0.6.x ====== 
- 
-==== Change SSID ==== 
-=== OpenWRT === 
-You can change the SSID with editing the file **/​etc/​config/​wireless** and then  
-  /​etc/​init.d/​network reload 
-your Network settings to make the change active. 
-=== Debian === 
-Edit the file **/​opt/​piratebox/​conf/​hostapd.conf** and change the line  
-  ssid=piratebox:​ free share 
-and restart your PirateBox-Scripts 
-==== Change of IP-Adresses ==== 
- 
-  * **/​opt/​piratebox/​conf/​piratebox.conf** - The following lines: 
- 
-   #​Network 
-   ​NET=192.168.77 
-    
-And if you want to change the IP of your Box directly, you need to find this line and exchange the 1: 
- 
-   #​IP-SHORT (is stringed together) 
-   # ​ Which IP is your Box??  i.e. 1 => 192.168.77.1 
-   ​IP_SHORT=1 
- 
-=== Both on OpenWRT === 
- 
-  * Additional on //OpenWRT// you need to change **/​etc/​config/​network** ​ 
- 
-   ​config interface '​loopback' ​                                                               
-        option ifname '​lo' ​                                                               ​ 
-        option proto '​static' ​                                                             
-        option ipaddr '​127.0.0.1' ​                                                         
-        option netmask '​255.0.0.0' ​                                                       ​ 
-                                                                                          ​ 
-   ​config interface '​lan' ​                                                                   ​ 
-        option ifname '​eth0' ​                                                             ​ 
-        option type '​bridge' ​                                                             ​ 
-        option proto '​static' ​     ​ 
-   #​------ ​ CHANGE THE LINE BELOW ------- 
-        option ipaddr '​192.168.1.1' ​         ​ 
-   #​------ ​ CHANGE THE LINE ABOVE ------- ​       ​ 
-        option netmask '​255.255.255.0' ​                                                   ​ 
- 
- 
-Restart your Scripts and reload your network-config on OpenWRT:  ​ 
-   /​etc/​init.d/​network reload ​ 
-  
-==== Small python Forum ==== 
- 
-For installing the pyForum named [[http://​www.triv.org.uk/​~nelis/​forest/​|Forest]],​ run: 
- 
-  /​opt/​piratebox/​bin/​install_piratebox.sh /​opt/​piratebox/​conf/​piratebox.conf pyForum 
- 
-Files for the forum are stored in  /​opt/​piratebox/​forumspace ​ (which should be Backuped before upgrading). 
-  
-//On scriptbased PirateBox// you have to do the following additional steps: 
- 
-     - Edit /​opt/​piratebox/​conf/​piratebox.conf find the line starting with **FORUM_LINK_HTML** and uncomment the 2nd line. 
-     - Restart the PirateBox 
-==== Imageboard ==== 
-This installs the [[http://​wakaba.c3.cx/​s/​web/​wakaba_kareha|kareha Imageboard]] to you Piratebox. It will installed to /​opt/​piratebox/​shared/​board . 
-**Read your system specific stuff!** 
-The following command is required, to ensure everything is setup correctly: 
- 
-    /​opt/​piratebox/​bin/​install_piratebox.sh /​opt/​piratebox/​conf/​piratebox.conf imageboard ​ 
- 
-If you made a mistake, you have to remove **/​opt/​piratebox/​share/​board/​init_done** ​ to get a fresh clean install. 
-    ​ 
-=== Debian === 
-Ensure that the basic Perl-Packages are installed. Usually everything needed is in the basic install included, and if you encounter problems, you can find "​dumps"/"​Errors"​ of the board in **/​opt/​piratebox/​tmp/​break.log** 
- 
-=== OpenWRT === 
-**Be Sure and ENSURE** that your PirateBox has a internet-connection. While running the step above, it will install all needed packages for the OpenWRT router to your box. ! 
- 
- 
-==== Secured directories ==== 
-With secured directories it is possible to save folder with passwords or simply upload into a folder structure. To enable this feature, find the following lines in **/​opt/​piratebox/​conf/​piratebox.conf** 
- 
-  ## Droopy Userdir Option? 
-  DROOPY_USERDIR=""​ 
-  # Uncomment the following line to enable Userdirs 
-  #​DROOPY_USERDIR="​-u True" 
-  ​ 
-Remove the # in the last line and restart your PirateBox-Scripts. 
- 
-==== Exchange Upload-Folder ==== 
-Do you want, that your users uploads to a different directory than the default directory, where the "​Browse"​ link points to?  
-You can easily achieve this with editing **/​opt/​piratebox/​conf/​piratebox.conf**. Find this line and enter your new upload folder: 
- 
-  #Upload Folder 
-  # Change this if you want to user uploaded data in a subfolder 
-  #   Make sure the folder exists 
-  # UPLOADFOLDER="​$FOLDER/​Upload"​ 
-  UPLOADFOLDER=$FOLDER 
- 
-**Avoid special characters in directory-name and ensure the directory exists and has the correct permissions!** 
- 
- 
-==== Disabling Shoutbox-Reset after reboot ==== 
-This feature is included in PirateBoxScripts >=v0.4.1 & PirateBoxScripts_Webserver > v0.2. 
- 
-On default, the Shoutbox is cleared on a new startup. To disable this, you need to set the following line in **/​opt/​piratebox/​conf/​piratebox.conf** to **no** 
- 
-   # Reset Shoutbox on Startup? 
-   ​RESET_CHAT="​yes"​ 
- 
- 
- 
-==== How-To Customize your PirateBox ==== 
- 
- 
-=== Hostname === 
-1. Edit **/​opt/​piratebox/​conf/​piratebox.conf** find this line:  
- 
-   #​HOSTNAME ​ ... if you really want to change it, plz change: 
-   # ​   bin/droopy 
-   # ​   conf/hosts 
-   ​HOST="​piratebox.lan"​ 
- 
-2. Add the new name in **/​opt/​piratebox/​conf/​hosts** ​  ( //since piratebox_webserver 0.3.1 this is not needed anymore, the file will be generated on startup// ) 
- 
-   ​192.168.1.1 ​ piratebox.lan ​ 
-   ​192.168.1.1 ​ piratebox 
- 
-3. Change it on the redirect.html in **/​opt/​piratebox/​www/​redirect.html** 
- 
-   <​meta http-equiv="​refresh"​ content="​0;​url=http://​piratebox.lan/"​ /> 
-    
-4. Change hostname in the index.html **/​opt/​piratebox/​www/​index.html** 
- 
-   <​iframe ​ width='​650'​ frameBorder='​0'​ src='​http://​piratebox.lan:​8080'>​Your browser does not supprt Iframes.. If you want to upload something, follow this <a href='​http://​piratebox.lan:​8080'>​Link</​a></​iframe>​ 
-==== Custom Directory Listing ==== 
-How to customize your personall directory-listing is described on the [[http://​redmine.lighttpd.net/​projects/​lighttpd/​wiki/​Docs:​ModDirlisting|Lighttpd wiki]] 
- 
-==== PHP for PirateBox ==== 
-**This is very experimental!** 
-Connect your PirateBox to the Internet and then run the following commands: 
- 
-    opkg update 
-    opkg -d piratebox install php5 
-    opkg -d piratebox install php5-cgi ​   ​ 
-    cp /​mnt/​ext/​etc/​php.ini /etc 
-    ln -s /​mnt/​ext/​etc/​php5 /etc/php5 
-    sed -i '​s,​extension_dir = \"/​usr/​lib/​php\",​extension_dir = \"/​usr/​local/​lib/​php\",​g'​ /​etc/​php.ini 
- 
-You might need to install some additional php-mods. This isn't easy to find out: 
- 
-    opkg -d piratebox install php5-mod-//​....// ​   ​ 
- 
-You can find more about extensions here [[http://​wiki.openwrt.org/​doc/​howto/​lamp#​lighttpd1|OpenWRT Setup LAMP - lighttpd]] 
-Then modify **/​opt/​piratebox/​conf/​lighttpd/​lighttpd.conf**. Find this line  
-    
-   ​$HTTP["​url"​] =~ "​^/​cgi-bin/"​ { 
-    cgi.assign = ( "​.py"​ => "/​usr/​bin/​python"​ ) 
-   ​} ​ 
-    
-  ​ 
-Add below 
- 
-   ​$HTTP["​url"​] =~ "​^/​php/"​ { 
-    cgi.assign = ( "​.php"​ => "/​usr/​local/​bin/​php-cgi"​ ) 
-   ​} ​ 
- 
-and find 
- 
-    static-file.exclude-extensions = ( "​.php","​.pl",​ "​.fcgi"​ , "​.cgi"​ , "​.py"​ )  
- 
-change to 
- 
-    static-file.exclude-extensions = ( "​.pl",​ "​.fcgi"​ , "​.cgi"​ , "​.py"​ )  
- 
-Find in /​etc/​php.ini 
- 
-    doc_root = "/​www" ​ 
- 
-and change it to  
- 
-    doc_root = "/​opt/​piratebox/​www" ​ 
- 
-Now every create a folder called "​php"​ to your /​opt/​piratebox/​www/​ 
- 
-  mkdir -p /​opt/​piratebox/​www/​php 
-  chown -R nobody /​opt/​piratebox/​www/​php 
-  ​ 
-You can lay down you php files there or in subfolders now.   You can lay down your php stuff on the USB-device and link to it. For example a link to my wiki located on the usb device: 
- 
-    ln -s /​mnt/​usb/​PirateBox/​wiki ​ /​opt/​piratebox/​www/​php/​wiki 
-==== Show connected clients ==== 
-//Included since 0.3.1// 
-There is a script, which greps the needed informations from "​iw"​. It was designed to run on OpenWRT, but it might work on laptops, too. 
-If you want to use this, run the following command: 
- 
-    /​opt/​piratebox/​bin/​install_piratebox.sh /​opt/​piratebox/​conf/​piratebox.conf station_cnt ​ 
-    ​ 
-The makes an entry to your crontab of the current user. It updates a station_cnt.txt file in /​opt/​piratebox/​www every 2 minutes. On **OpenWRT you have to** ensure, that the cron daemon runs: 
- 
-   /​etc/​init.d/​cron enable && /​etc/​init.d/​cron start  
- 
-==== www offload ==== 
-This option is important for the OpenWRT users. You want a www folder on your USB stick? ​ 
-Put your folder to  
- 
-    <usb device>/​PirateBox/​www_alt ​ 
- 
-Then install your box or run the following commands on your box 
- 
-    /​etc/​init.d/​piratebox stop 
-    /​etc/​init.d/​piratebox updatePB 
-    /​etc/​init.d/​piratebox start 
-        ​ 
-The folder is recognized, if the following message apears: 
-<​code>​ 
-    ---------------------------------------------------- 
-    ####      Alternative www folder found          #### 
-    ####          /​mnt/​usb/​PirateBox/​www_alt ​       #### 
-    ####         ​switching directories ​             #### 
-    ---------------------------------------------------- 
-</​code>​ 
- 
-==== bigger Image for webdata ==== 
-[[http://​ubuntuhak.blogspot.de/​2012/​10/​how-to-create-format-and-mount-img-files.html|How to create, format and mount .img files]] 
- 
-==== Calibre OPDS ==== 
-Some of our member wrote a great tutorial to get the software running: [[http://​forum.daviddarts.com/​read.php?​8,​7921,​7957#​msg-7957|PirateBox + COPS (Calibre OPDS (and HTML) PHP Server)]] 
- 
-==== OpenStreetMap on Piratebox ==== 
- 
-[[https://​github.com/​reinvented/​openstreetbox|PirateBox + OpenStreetMap]]