etc edits

This commit is contained in:
d3m1g0d
2019-06-15 14:09:14 +02:00
parent 209f557a9b
commit 548ae2be2c
28 changed files with 394 additions and 1 deletions

View File

@@ -6,4 +6,4 @@ wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ssid=TeraHz
wpa_passphrase=terahertz
wpa_passphrase=teraherc

View File

@@ -0,0 +1,146 @@
#!/bin/sh
# Copyright (C) 2006-2009 Debian hostapd maintainers
# Faidon Liambotis <paravoid@debian.org>
# Kel Modderman <kel@otaku42.de>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# On Debian GNU/Linux systems, the text of the GPL license,
# version 2, can be found in /usr/share/common-licenses/GPL-2.
# quit if we're called for lo
if [ "$IFACE" = lo ]; then
exit 0
fi
if [ -n "$IF_HOSTAPD" ]; then
HOSTAPD_CONF="$IF_HOSTAPD"
else
exit 0
fi
HOSTAPD_BIN="/usr/sbin/hostapd"
HOSTAPD_PNAME="hostapd"
HOSTAPD_PIDFILE="/run/hostapd.$IFACE.pid"
HOSTAPD_OMIT_PIDFILE="/run/sendsigs.omit.d/hostapd.$IFACE.pid"
if [ ! -x "$HOSTAPD_BIN" ]; then
exit 0
fi
if [ "$VERBOSITY" = "1" ]; then
TO_NULL="/dev/stdout"
else
TO_NULL="/dev/null"
fi
hostapd_msg () {
case "$1" in
verbose)
shift
echo "$HOSTAPD_PNAME: $@" > "$TO_NULL"
;;
stderr)
shift
echo "$HOSTAPD_PNAME: $@" > /dev/stderr
;;
*)
;;
esac
}
test_hostapd_pidfile () {
if [ -n "$1" ] && [ -f "$2" ]; then
if start-stop-daemon --stop --quiet --signal 0 \
--exec "$1" --pidfile "$2"; then
return 0
else
rm -f "$2"
return 1
fi
else
return 1
fi
}
init_hostapd () {
HOSTAPD_OPTIONS="-B -P $HOSTAPD_PIDFILE $HOSTAPD_CONF"
HOSTAPD_MESSAGE="$HOSTAPD_BIN $HOSTAPD_OPTIONS"
test_hostapd_pidfile "$HOSTAPD_BIN" "$HOSTAPD_PIDFILE" && return 0
hostapd_msg verbose "$HOSTAPD_MESSAGE"
start-stop-daemon --start --oknodo --quiet --exec "$HOSTAPD_BIN" \
--pidfile "$HOSTAPD_PIDFILE" -- $HOSTAPD_OPTIONS > "$TO_NULL"
if [ "$?" -ne 0 ]; then
return "$?"
fi
HOSTAPD_PIDFILE_WAIT=0
until [ -s "$HOSTAPD_PIDFILE" ]; do
if [ "$HOSTAPD_PIDFILE_WAIT" -ge 5 ]; then
hostapd_msg stderr \
"timeout waiting for pid file creation"
return 1
fi
HOSTAPD_PIDFILE_WAIT=$(($HOSTAPD_PIDFILE_WAIT + 1))
sleep 1
done
cat "$HOSTAPD_PIDFILE" > "$HOSTAPD_OMIT_PIDFILE"
return 0
}
kill_hostapd () {
HOSTAPD_MESSAGE="stopping $HOSTAPD_PNAME via pidfile: $HOSTAPD_PIDFILE"
test_hostapd_pidfile "$HOSTAPD_BIN" "$HOSTAPD_PIDFILE" || return 0
hostapd_msg verbose "$HOSTAPD_MESSAGE"
start-stop-daemon --stop --oknodo --quiet --exec "$HOSTAPD_BIN" \
--pidfile "$HOSTAPD_PIDFILE" > "$TO_NULL"
[ "$HOSTAPD_OMIT_PIDFILE" ] && rm -f "$HOSTAPD_OMIT_PIDFILE"
}
case "$MODE" in
start)
case "$PHASE" in
pre-up)
init_hostapd || exit 1
;;
*)
hostapd_msg stderr "unknown phase: \"$PHASE\""
exit 1
;;
esac
;;
stop)
case "$PHASE" in
post-down)
kill_hostapd
;;
*)
hostapd_msg stderr "unknown phase: \"$PHASE\""
exit 1
;;
esac
;;
*)
hostapd_msg stderr "unknown mode: \"$MODE\""
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,25 @@
# /usr/share/doc/lighttpd/authentication.txt.gz
server.modules += ( "mod_auth" )
# auth.backend = "plain"
# auth.backend.plain.userfile = "lighttpd.user"
# auth.backend.plain.groupfile = "lighttpd.group"
# auth.backend.ldap.hostname = "localhost"
# auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
# auth.backend.ldap.filter = "(uid=$)"
# auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.10"
# ),
# "/server-info" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "group=www|user=jan|host=192.168.2.10"
# )
# )

View File

@@ -0,0 +1,3 @@
server.modules += ( "mod_accesslog" )
accesslog.filename = "/var/log/lighttpd/access.log"

View File

@@ -0,0 +1,15 @@
# /usr/share/doc/lighttpd/cgi.txt
server.modules += ( "mod_cgi" )
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( "" => "" )
}
## Warning this represents a security risk, as it allow to execute any file
## with a .pl/.py even outside of /usr/lib/cgi-bin.
#
#cgi.assign = (
# ".pl" => "/usr/bin/perl",
# ".py" => "/usr/bin/python",
#)

View File

@@ -0,0 +1,2 @@
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"

View File

@@ -0,0 +1 @@
server.modules += ( "mod_evasive" )

View File

@@ -0,0 +1,5 @@
# http://redmine.lighttpd.net/wiki/1/Docs:ModEVhost
server.modules += ( "mod_evhost" )
evhost.path-pattern = "/srv/%_/htdocs"

View File

@@ -0,0 +1,3 @@
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModExpire
server.modules += ( "mod_expire" )

View File

@@ -0,0 +1,4 @@
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
server.modules += ( "mod_fastcgi" )

View File

@@ -0,0 +1 @@
server.modules += ( "mod_flv_streaming" )

View File

@@ -0,0 +1,3 @@
$HTTP["host"] =~ "^www\.(.*)" {
url.redirect = ( "^/(.*)" => "http://%1/$1" )
}

View File

@@ -0,0 +1,25 @@
# /usr/share/doc/lighttpd/proxy.txt
server.modules += ( "mod_proxy" )
## Balance algorithm, possible values are: "hash", "round-robin" or "fair" (default)
# proxy.balance = "hash"
## Redirect all queries to files ending with ".php" to 192.168.0.101:80
#proxy.server = ( ".php" =>
# (
# ( "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )
## Redirect all connections on www.example.com to 10.0.0.1{0,1,2,3}
#$HTTP["host"] == "www.example.com" {
# proxy.balance = "hash"
# proxy.server = ( "" => ( ( "host" => "10.0.0.10" ),
# ( "host" => "10.0.0.11" ),
# ( "host" => "10.0.0.12" ),
# ( "host" => "10.0.0.13" ) ) )
#}

View File

@@ -0,0 +1,4 @@
# /usr/share/doc/lighttpd/rewrite.txt
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ConfigurationOptions#mod_rewrite-rewriting
server.modules += ( "mod_rewrite" )

View File

@@ -0,0 +1,10 @@
# /usr/share/doc/lighttpd/rrdtool.txt
server.modules += ( "mod_rrdtool" )
## path to the rrdtool binary
rrdtool.binary = "/usr/bin/rrdtool"
## file to store the rrd database, will be created by lighttpd
rrdtool.db-name = "/var/www/lighttpd.rrd"

View File

@@ -0,0 +1,11 @@
# /usr/share/doc/lighttpd/simple-vhost.txt
server.modules += ( "mod_simple_vhost" )
## The document root of a virtual host is document-root =
## simple-vhost.server-root + $HTTP["host"] + simple-vhost.document-root
simple-vhost.server-root = "/srv"
simple-vhost.document-root = "htdocs"
## the default host if no host is sent
simple-vhost.default-host = "www.example.com"

View File

@@ -0,0 +1,5 @@
# /usr/share/doc/lighttpd/ssi.txt
server.modules += ( "mod_ssi" )
ssi.extension = ( ".shtml" )

View File

@@ -0,0 +1,9 @@
# /usr/share/doc/lighttpd/ssl.txt
$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/server.pem"
ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM"
ssl.honor-cipher-order = "enable"
}

View File

@@ -0,0 +1,15 @@
# /usr/share/doc/lighttpd/status.txt
# http://trac.lighttpd.net/trac/wiki/Docs%3AModStatus
server.modules += ( "mod_status" )
# status.status-url = "/server-status"
# status.config-url = "/server-config"
## relative URL for a plain-text page containing the internal statistics
# status.statistics-url = "/server-statistics"
## add JavaScript which allows client-side sorting for the connection overview
## default: enable
# status.enable-sort = "disable"

View File

@@ -0,0 +1,13 @@
## The userdir module provides a simple way to link user-based directories into
## the global namespace of the webserver.
##
# /usr/share/doc/lighttpd/userdir.txt
server.modules += ( "mod_userdir" )
## the subdirectory of a user's home dir which should be accessible
## under http://$host/~$user
userdir.path = "public_html"
## The users whose home directories should not be accessible
userdir.exclude-user = ( "root", "postmaster" )

View File

@@ -0,0 +1 @@
server.modules += ( "mod_usertrack" )

View File

@@ -0,0 +1,6 @@
# -*- depends: accesslog -*-
server.modules += ( "mod_extforward" )
# extforward.headers = ("X-Cluster-Client-Ip")
# extforward.forwarder = ("10.0.0.232" => "trust")

View File

@@ -0,0 +1,20 @@
# -*- depends: fastcgi -*-
# /usr/share/doc/lighttpd/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi
## Start an FastCGI server for php (needs the php5-cgi package)
fastcgi.server += ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/var/run/lighttpd/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)

View File

@@ -0,0 +1,15 @@
#### handle Debian Policy Manual, Section 11.5. urls
## by default allow them only from localhost
$HTTP["remoteip"] =~ "^127\.0\.0\.1$|^::1$" {
alias.url += (
"/cgi-bin/" => "/usr/lib/cgi-bin/",
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( "" => "" )
}
}

View File

@@ -0,0 +1 @@
alias.url += ("/javascript" => "/usr/share/javascript")

View File

@@ -0,0 +1,22 @@
ligghttpd Configuration under Debian GNU/Linux
==============================================
Files and Directories in /etc/lighttpd:
---------------------------------------
lighttpd.conf:
main configuration file
conf-available/
This directory contains a series of .conf files. These files contain
configuration directives necessary to load and run webserver modules.
If you want to create your own files they names should be
build as nn-name.conf where "nn" is two digit number (number
is used to find order for loading files)
conf-enabled/
To actually enable a module for lighttpd, it is necessary to create a
symlink in this directory to the .conf file in conf-available/.
Enabling and disabling modules could be done by provided
/usr/sbin/lighty-enable-mod and /usr/sbin/lighty-disable-mod scripts.

View File

@@ -0,0 +1 @@
../conf-available/90-javascript-alias.conf

View File

@@ -0,0 +1,27 @@
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
)
server.document-root = "/home/terahz/TeraHz/frontend"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"