initial import
This commit is contained in:
39
files/lighttpd-grav.conf
Normal file
39
files/lighttpd-grav.conf
Normal file
@ -0,0 +1,39 @@
|
||||
##PREVENTING EXPLOITS
|
||||
#$HTTP["querystring"] =~ "base64_encode[^(]*\([^)]*\)" {
|
||||
# url.redirect = (".*" => "/index.php" )
|
||||
#}
|
||||
#$HTTP["querystring"] =~ "(<|%3C)([^s]*s)+cript.*(>|%3E)" {
|
||||
# url.redirect = (".*" => "/index.php" )
|
||||
#}
|
||||
#$HTTP["querystring"] =~ "GLOBALS(=|\[|\%[0-9A-Z])" {
|
||||
# url.redirect = (".*" => "/index.php" )
|
||||
#}
|
||||
#$HTTP["querystring"] =~ "_REQUEST(=|\[|\%[0-9A-Z])" {
|
||||
# url.redirect = (".*" => "/index.php" )
|
||||
#}
|
||||
|
||||
#REROUTING TO THE INDEX PAGE
|
||||
url.rewrite-if-not-file = (
|
||||
"^/(.*)$" => "/index.php/$1"
|
||||
)
|
||||
|
||||
##IMPROVING SECURITY
|
||||
#$HTTP["url"] =~ "^/(LICENSE.txt|composer.json|composer.lock|nginx.conf|web.config)$" {
|
||||
# url.access-deny = ("")
|
||||
#}
|
||||
#$HTTP["url"] =~ "^/(.git|cache|bin|logs|backup|tests)/(.*)" {
|
||||
# url.access-deny = ("")
|
||||
#}
|
||||
#$HTTP["url"] =~ "^/(system|user|vendor)/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" {
|
||||
# url.access-deny = ("")
|
||||
#}
|
||||
#$HTTP["url"] =~ "^/(\.(.*))" {
|
||||
# url.access-deny = ("")
|
||||
#}
|
||||
#url.access-deny = (".md","~",".inc")
|
||||
|
||||
#PREVENT BROWSING AND SET INDEXES
|
||||
$HTTP["url"] =~ "^/($|/)" {
|
||||
dir-listing.activate = "disable"
|
||||
index-file.names = ( "index.php", "index.html" , "index.htm" )
|
||||
}
|
9
files/lighttpd-php-cgi.conf
Normal file
9
files/lighttpd-php-cgi.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server.modules += ("mod_fastcgi")
|
||||
fastcgi.server = ( ".php" =>
|
||||
( "localhost" =>
|
||||
(
|
||||
"socket" => "/run/lighttpd/lighttpd-fastcgi-php-" + PID + ".socket",
|
||||
"bin-path" => "/usr/bin/php-cgi"
|
||||
)
|
||||
)
|
||||
)
|
28
files/lighttpd.conf
Normal file
28
files/lighttpd.conf
Normal file
@ -0,0 +1,28 @@
|
||||
var.basedir = "/var/www/localhost"
|
||||
var.logdir = "/var/log/lighttpd"
|
||||
var.statedir = "/var/lib/lighttpd"
|
||||
server.modules = (
|
||||
"mod_rewrite",
|
||||
"mod_access",
|
||||
"mod_accesslog"
|
||||
)
|
||||
|
||||
include "mime-types.conf"
|
||||
include "php-cgi.conf"
|
||||
include "grav.conf"
|
||||
|
||||
server.username = "lighttpd"
|
||||
server.groupname = "lighttpd"
|
||||
|
||||
server.document-root = var.basedir + "/htdocs"
|
||||
server.pid-file = "/run/lighttpd.pid"
|
||||
server.errorlog = var.logdir + "/error.log"
|
||||
server.indexfiles = ("index.php", "index.html",
|
||||
"index.htm", "default.htm")
|
||||
|
||||
server.follow-symlink = "enable"
|
||||
static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
|
||||
accesslog.filename = var.logdir + "/access.log"
|
||||
|
||||
|
||||
# vim: set ft=conf foldmethod=marker et :
|
Reference in New Issue
Block a user