fixes and config files for webdev
This commit is contained in:
parent
5ac5597587
commit
40c4faae33
|
@ -0,0 +1,99 @@
|
||||||
|
## Configuration for Piratebox
|
||||||
|
|
||||||
|
server.modules = (
|
||||||
|
# "mod_access", not needed!
|
||||||
|
"mod_alias",
|
||||||
|
# "mod_compress", Disabled, fixing reload Problem??
|
||||||
|
"mod_redirect",
|
||||||
|
# "mod_rewrite",
|
||||||
|
"mod_setenv",
|
||||||
|
)
|
||||||
|
|
||||||
|
var.basedir=env.HOME + /tmp
|
||||||
|
|
||||||
|
server.document-root = basedir + "/www"
|
||||||
|
|
||||||
|
|
||||||
|
## Locate the tmp storage into tmp. It is in most cases the ram
|
||||||
|
## Limit the uploads to 4MB to save - especially on small devices
|
||||||
|
## the device from dieing because OUT-OF-RAM exceptions
|
||||||
|
## in KB => 4MB
|
||||||
|
server.upload-dirs = ( "/tmp" )
|
||||||
|
server.max-request-size = 4048
|
||||||
|
|
||||||
|
server.errorlog = "/tmp/error.log"
|
||||||
|
server.breakagelog = "/tmp/break.log"
|
||||||
|
server.pid-file = "/tmp/lighttpd.pid"
|
||||||
|
|
||||||
|
|
||||||
|
index-file.names = ( "index.php", "index.html",
|
||||||
|
"index.htm", "default.htm",
|
||||||
|
" index.lighttpd.html" )
|
||||||
|
|
||||||
|
url.access-deny = ( "~", ".inc" )
|
||||||
|
|
||||||
|
# added .cgi .py
|
||||||
|
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" , ".cgi" , ".py" )
|
||||||
|
|
||||||
|
|
||||||
|
# Enable lighttpd on ipv6
|
||||||
|
$SERVER["socket"] == "[::]:8001" { }
|
||||||
|
server.port = 8001
|
||||||
|
|
||||||
|
dir-listing.encoding = "utf-8"
|
||||||
|
server.dir-listing = "enable"
|
||||||
|
|
||||||
|
# Grabs main css
|
||||||
|
dir-listing.external-css = "/css/page_style.css"
|
||||||
|
|
||||||
|
# Header
|
||||||
|
# Enables header section
|
||||||
|
dir-listing.show-header = "enable"
|
||||||
|
dir-listing.encode-header = "disable"
|
||||||
|
# Hides HEADER.txt from listing
|
||||||
|
dir-listing.hide-header-file = "enable"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
# Enables footer section
|
||||||
|
dir-listing.show-readme = "enable"
|
||||||
|
dir-listing.encode-readme = "disable"
|
||||||
|
# Hides README.txt from listing
|
||||||
|
dir-listing.hide-readme-file = "enable"
|
||||||
|
# Diables default footer text
|
||||||
|
dir-listing.set-footer = " "
|
||||||
|
|
||||||
|
## custom MIME-Type support
|
||||||
|
include "piratebox/piratebox/conf/lighttpd/mime.types"
|
||||||
|
|
||||||
|
#----------- cgi.conf --------------
|
||||||
|
server.modules += ( "mod_cgi" )
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/cgi-bin/" {
|
||||||
|
cgi.assign = ( ".py" => "/usr/bin/python2" )
|
||||||
|
}
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/board/" {
|
||||||
|
cgi.assign = ( ".pl" => "/usr/bin/perl" , )
|
||||||
|
}
|
||||||
|
#-------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 404 Error Page with redirect
|
||||||
|
#
|
||||||
|
#server.error-handler-404 = "/redirect.html"
|
||||||
|
|
||||||
|
## for better debugging
|
||||||
|
#server.modules += ( "mod_accesslog" )
|
||||||
|
#accesslog.filename = "/tmp/access.log"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include "piratebox/piratebox/conf/lighttpd/fastcgi.conf"
|
||||||
|
|
||||||
|
|
||||||
|
setenv.add-environment = (
|
||||||
|
"SHOUTBOX_GEN_HTMLFILE" => basedir "/chat_content.html" ,
|
||||||
|
"SHOUTBOX_CHATFILE" => basedir + "/cgi-bin/data.pso" ,
|
||||||
|
"SHOUTBOX_CLIENT_TIMESTAMP" => "yes"
|
||||||
|
)
|
|
@ -0,0 +1,100 @@
|
||||||
|
## Configuration for Piratebox
|
||||||
|
|
||||||
|
server.modules = (
|
||||||
|
# "mod_access", not needed!
|
||||||
|
"mod_alias",
|
||||||
|
# "mod_compress", Disabled, fixing reload Problem??
|
||||||
|
"mod_redirect",
|
||||||
|
# "mod_rewrite",
|
||||||
|
"mod_setenv",
|
||||||
|
)
|
||||||
|
|
||||||
|
var.basedir=env.PWD
|
||||||
|
|
||||||
|
server.document-root = basedir + "/piratebox/piratebox/www"
|
||||||
|
|
||||||
|
|
||||||
|
## Locate the tmp storage into tmp. It is in most cases the ram
|
||||||
|
## Limit the uploads to 4MB to save - especially on small devices
|
||||||
|
## the device from dieing because OUT-OF-RAM exceptions
|
||||||
|
## in KB => 4MB
|
||||||
|
server.upload-dirs = ( "/tmp" )
|
||||||
|
server.max-request-size = 4048
|
||||||
|
|
||||||
|
server.errorlog = "/tmp/error.log"
|
||||||
|
server.breakagelog = "/tmp/break.log"
|
||||||
|
server.pid-file = "/tmp/lighttpd.pid"
|
||||||
|
|
||||||
|
|
||||||
|
index-file.names = ( "index.php", "index.html",
|
||||||
|
"index.htm", "default.htm",
|
||||||
|
" index.lighttpd.html" )
|
||||||
|
|
||||||
|
url.access-deny = ( "~", ".inc" )
|
||||||
|
|
||||||
|
# added .cgi .py
|
||||||
|
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" , ".cgi" , ".py" )
|
||||||
|
|
||||||
|
|
||||||
|
# Enable lighttpd on ipv6
|
||||||
|
$SERVER["socket"] == "[::]:8001" { }
|
||||||
|
server.port = 8001
|
||||||
|
|
||||||
|
dir-listing.encoding = "utf-8"
|
||||||
|
server.dir-listing = "enable"
|
||||||
|
|
||||||
|
# Grabs main css
|
||||||
|
dir-listing.external-css = "/css/page_style.css"
|
||||||
|
|
||||||
|
# Header
|
||||||
|
# Enables header section
|
||||||
|
dir-listing.show-header = "enable"
|
||||||
|
dir-listing.encode-header = "disable"
|
||||||
|
# Hides HEADER.txt from listing
|
||||||
|
dir-listing.hide-header-file = "enable"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
# Enables footer section
|
||||||
|
dir-listing.show-readme = "enable"
|
||||||
|
dir-listing.encode-readme = "disable"
|
||||||
|
# Hides README.txt from listing
|
||||||
|
dir-listing.hide-readme-file = "enable"
|
||||||
|
# Diables default footer text
|
||||||
|
dir-listing.set-footer = " "
|
||||||
|
|
||||||
|
## custom MIME-Type support
|
||||||
|
include basedir + "/piratebox/piratebox/conf/lighttpd/mime.types"
|
||||||
|
|
||||||
|
#----------- cgi.conf --------------
|
||||||
|
server.modules += ( "mod_cgi" )
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/cgi-bin/" {
|
||||||
|
cgi.assign = ( ".py" => "/usr/bin/python2" )
|
||||||
|
}
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/board/" {
|
||||||
|
cgi.assign = ( ".pl" => "/usr/bin/perl" , )
|
||||||
|
}
|
||||||
|
#-------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 404 Error Page with redirect
|
||||||
|
#
|
||||||
|
#server.error-handler-404 = "/redirect.html"
|
||||||
|
|
||||||
|
## for better debugging
|
||||||
|
#server.modules += ( "mod_accesslog" )
|
||||||
|
#accesslog.filename = "/tmp/access.log"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include basedir + "/piratebox/piratebox/conf/lighttpd/fastcgi.conf"
|
||||||
|
|
||||||
|
|
||||||
|
setenv.add-environment = (
|
||||||
|
"PYTHONPATH" => basedir + "/piratebox/piratebox/python_lib" ,
|
||||||
|
"SHOUTBOX_GEN_HTMLFILE" => basedir + "/piratebox/piratebox/www/chat_content.html" ,
|
||||||
|
"SHOUTBOX_CHATFILE" => basedir + "/piratebox/piratebox/www/cgi-bin/data.pso" ,
|
||||||
|
"SHOUTBOX_CLIENT_TIMESTAMP" => "yes"
|
||||||
|
)
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class='message'><date>09:52:54</date> <name>Anonymous:</name><data class='red'>ttttttttt</data></div>
|
||||||
|
<div class='message'><date>09:52:25</date> <name>Anonymous:</name><data class='def'>ttt</data></div>
|
||||||
|
<div class='message'><date>09:32:38</date> <name>Anonymous:</name><data class='def'>test</data></div>
|
|
@ -46,8 +46,8 @@ class UploadHandler
|
||||||
// This is a failsafe function, if the web-UI runs in an
|
// This is a failsafe function, if the web-UI runs in an
|
||||||
// non-piratebox script environment. That should help
|
// non-piratebox script environment. That should help
|
||||||
// developing the website more easier.
|
// developing the website more easier.
|
||||||
$t_upload_dir = dirname($this->get_server_var('SCRIPT_FILENAME')).'/../Shared/',
|
$t_upload_dir = dirname($this->get_server_var('SCRIPT_FILENAME')).'/../Shared/';
|
||||||
if ( isset ( $this->get_server_var('UPLOAD_PATH') ) ) {
|
if ( $this->get_server_var('UPLOAD_PATH') <> "" ) {
|
||||||
$t_upload_dir = $this->get_server_var('UPLOAD_PATH') ;
|
$t_upload_dir = $this->get_server_var('UPLOAD_PATH') ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue