|
@@ -1,73 +1,39 @@
|
|
server.modules = (
|
|
server.modules = (
|
|
"mod_access",
|
|
"mod_access",
|
|
"mod_cgi",
|
|
"mod_cgi",
|
|
- "mod_compress",
|
|
|
|
"mod_accesslog",
|
|
"mod_accesslog",
|
|
"mod_rewrite",
|
|
"mod_rewrite",
|
|
"mod_alias",
|
|
"mod_alias",
|
|
"mod_auth",
|
|
"mod_auth",
|
|
"mod_setenv",
|
|
"mod_setenv",
|
|
- "mod_dirlisting",
|
|
|
|
-# "mod_status",
|
|
|
|
-# "mod_alias",
|
|
|
|
-# "mod_redirect",
|
|
|
|
|
|
+ "mod_status",
|
|
# "mod_debug"
|
|
# "mod_debug"
|
|
)
|
|
)
|
|
|
|
|
|
-server.document-root = "/www/htdocs"
|
|
|
|
-server.upload-dirs = ( "/www/htdocs/tmp" )
|
|
|
|
-server.errorlog = "/www/htdocs/logs/error.log"
|
|
|
|
-accesslog.filename = "/www/htdocs/logs/access.log"
|
|
|
|
-server.pid-file = "/var/run/lighttpd.pid"
|
|
|
|
-server.username = "httpd"
|
|
|
|
-server.groupname = "nogroup"
|
|
|
|
-server.port = 80
|
|
|
|
|
|
+server.document-root = "/www/htdocs"
|
|
|
|
+server.upload-dirs = ( "/www/tmp" )
|
|
|
|
+server.errorlog = "/www/log/error.log"
|
|
|
|
+accesslog.filename = "/www/log/access.log"
|
|
|
|
+server.pid-file = "/var/run/lighttpd.pid"
|
|
|
|
+server.username = "httpd"
|
|
|
|
+server.groupname = "nogroup"
|
|
|
|
+server.port = 80
|
|
|
|
|
|
-dir-listing.activate = "enable"
|
|
|
|
-dir-listing.hide-dotfiles = "enable"
|
|
|
|
-
|
|
|
|
-## defines var.superglueVersion from /etc/superglue_version
|
|
|
|
-include_shell "/etc/lighttpd/vars.sh"
|
|
|
|
-
|
|
|
|
-setenv.add-response-header = ( "X-Superglue-Version" => var.superglueVersion )
|
|
|
|
|
|
+#dir-listing.activate = "enable"
|
|
|
|
+#dir-listing.hide-dotfiles = "enable"
|
|
|
|
|
|
#debug.log-request-handling = "enable"
|
|
#debug.log-request-handling = "enable"
|
|
#debug.log-request-header = "enable"
|
|
#debug.log-request-header = "enable"
|
|
-#debug.log-file-not-found = "enable"
|
|
|
|
|
|
+#debug.log-file-not-found = "enable"
|
|
#debug.log-request-header-on-error = "enable"
|
|
#debug.log-request-header-on-error = "enable"
|
|
#debug.log-response-header = "enable"
|
|
#debug.log-response-header = "enable"
|
|
#debug.log-condition-handling = "enable"
|
|
#debug.log-condition-handling = "enable"
|
|
-
|
|
|
|
-auth.backend = "htdigest"
|
|
|
|
-auth.backend.htdigest.userfile = "/www/lib/admin/htpasswd"
|
|
|
|
#auth.debug = 2
|
|
#auth.debug = 2
|
|
|
|
|
|
#setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
|
#setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
|
-compress.cache-dir = "/www/htdocs/tmp/compress"
|
|
|
|
-compress.max-filesize = "1024"
|
|
|
|
-compress.filetype = (
|
|
|
|
- "application/atom+xml",
|
|
|
|
- "application/javascript",
|
|
|
|
- "application/json",
|
|
|
|
- "application/rss+xml",
|
|
|
|
- "application/vnd.ms-fontobject",
|
|
|
|
- "application/x-font-ttf",
|
|
|
|
- "application/x-web-app-manifest+json",
|
|
|
|
- "application/xhtml+xml",
|
|
|
|
- "application/xml",
|
|
|
|
- "application/font-sfnt",
|
|
|
|
- "font/opentype",
|
|
|
|
- "image/svg+xml",
|
|
|
|
- "image/x-icon",
|
|
|
|
- "text/css",
|
|
|
|
- "text/html",
|
|
|
|
- "text/plain",
|
|
|
|
- "text/x-component",
|
|
|
|
- "text/xml",
|
|
|
|
-)
|
|
|
|
|
|
|
|
index-file.names = (
|
|
index-file.names = (
|
|
- "index.html",
|
|
|
|
|
|
+ "index.html",
|
|
"default.html"
|
|
"default.html"
|
|
)
|
|
)
|
|
|
|
|
|
@@ -78,62 +44,63 @@ cgi.assign = (
|
|
|
|
|
|
url.access-deny = ( "~", ".inc", ".htaccess", ".htpasswd", "htpasswd", "/tmp/" )
|
|
url.access-deny = ( "~", ".inc", ".htaccess", ".htpasswd", "htpasswd", "/tmp/" )
|
|
|
|
|
|
|
|
+auth.backend = "htdigest"
|
|
|
|
+auth.backend.htdigest.userfile = "/www/lib/htpasswd"
|
|
|
|
+auth.require = (
|
|
|
|
+ "/admin" => (
|
|
|
|
+ "method" => "digest",
|
|
|
|
+ "realm" => "superglue",
|
|
|
|
+ "require" => "valid-user"
|
|
|
|
+ ),
|
|
|
|
+ "/log" => (
|
|
|
|
+ "method" => "digest",
|
|
|
|
+ "realm" => "superglue",
|
|
|
|
+ "require" => "valid-user"
|
|
|
|
+ ),
|
|
|
|
+ "/server-status" => (
|
|
|
|
+ "method" => "digest",
|
|
|
|
+ "realm" => "superglue",
|
|
|
|
+ "require" => "valid-user"
|
|
|
|
+ )
|
|
|
|
+)
|
|
|
|
+
|
|
$HTTP["request-method"] == "GET" {
|
|
$HTTP["request-method"] == "GET" {
|
|
url.rewrite = (
|
|
url.rewrite = (
|
|
"^/resources/(.*)$" => "resources/$1",
|
|
"^/resources/(.*)$" => "resources/$1",
|
|
"^/devTools/(.*)$" => "devTools/$1",
|
|
"^/devTools/(.*)$" => "devTools/$1",
|
|
"^/templates/(.*)$" => "templates/$1",
|
|
"^/templates/(.*)$" => "templates/$1",
|
|
- "^/admin/(.*)$" => "admin/admin.sh"
|
|
|
|
),
|
|
),
|
|
alias.url = (
|
|
alias.url = (
|
|
"/resources" => "/www/lib/resources",
|
|
"/resources" => "/www/lib/resources",
|
|
"/devTools" => "/www/lib/devTools",
|
|
"/devTools" => "/www/lib/devTools",
|
|
"/templates" => "/www/lib/templates",
|
|
"/templates" => "/www/lib/templates",
|
|
- "/admin" => "/www/lib/admin"
|
|
|
|
|
|
+ "/admin" => "/www/lib/cgi/admin.cgi"
|
|
)
|
|
)
|
|
- ## override content and mime type for dotless files to text/html
|
|
|
|
- $HTTP["url"] !~ "(\.)" {
|
|
|
|
- setenv.add-response-header += (
|
|
|
|
- "X-Superglue-Dotless" => "text/html Content-Type was forced",
|
|
|
|
- "Content-Type" => "text/html"
|
|
|
|
- )
|
|
|
|
|
|
+ ## override content and mime type for dotless files to text/html
|
|
|
|
+ $HTTP["url"] !~ "(\.)" {
|
|
|
|
+ setenv.add-response-header += (
|
|
|
|
+ "X-Superglue-Dotless" => "text/html Content-Type was forced",
|
|
|
|
+ "Content-Type" => "text/html"
|
|
|
|
+ )
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
$HTTP["request-method"] == "POST" {
|
|
$HTTP["request-method"] == "POST" {
|
|
-# url.rewrite = ( "^(/(?!admin).*)" => "post.cgi",
|
|
|
|
- url.rewrite = (
|
|
|
|
- "^(/(?!admin).*)" => "post.sh",
|
|
|
|
- "^(/(admin).*)" => "admin.sh"
|
|
|
|
|
|
+ alias.url = (
|
|
|
|
+ "/admin" => "/www/lib/cgi/admin.cgi",
|
|
|
|
+ "" => "/www/lib/cgi/post.cgi"
|
|
)
|
|
)
|
|
-# $HTTP["url"] =~ "^/post.cgi" {
|
|
|
|
- $HTTP["url"] =~ "^/post.sh" {
|
|
|
|
- server.document-root = "/www/lib/cgi"
|
|
|
|
- },
|
|
|
|
- $HTTP["url"] =~ "^/admin.sh" {
|
|
|
|
- server.document-root = "/www/lib/admin"
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-auth.require = (
|
|
|
|
-# "/post.cgi" => ( "method" => "digest",
|
|
|
|
-# "realm" => "superglue",
|
|
|
|
-# "require" => "valid-user" ),
|
|
|
|
- "/post.sh" => (
|
|
|
|
- "method" => "digest",
|
|
|
|
- "realm" => "superglue",
|
|
|
|
- "require" => "valid-user"
|
|
|
|
- ),
|
|
|
|
- "/admin" => (
|
|
|
|
- "method" => "digest",
|
|
|
|
- "realm" => "superglue",
|
|
|
|
- "require" => "valid-user"
|
|
|
|
- ),
|
|
|
|
- "/logs" => (
|
|
|
|
- "method" => "digest",
|
|
|
|
- "realm" => "superglue",
|
|
|
|
- "require" => "valid-user"
|
|
|
|
|
|
+ auth.require = (
|
|
|
|
+ "" => (
|
|
|
|
+ "method" => "digest",
|
|
|
|
+ "realm" => "superglue",
|
|
|
|
+ "require" => "valid-user"
|
|
|
|
+ )
|
|
)
|
|
)
|
|
-)
|
|
|
|
|
|
+}
|
|
|
|
|
|
-include "/etc/lighttpd/mime.conf"
|
|
|
|
|
|
+## reads optional conf files
|
|
|
|
+include_shell "/etc/lighttpd/opts.sh vhosts.conf mime.conf" # compress.conf
|
|
|
|
+## defines var.superglueVersion from /etc/superglue_version
|
|
|
|
+include_shell "/etc/lighttpd/vars.sh"
|
|
|
|
+setenv.add-response-header = ( "X-Superglue-Version" => var.superglueVersion )
|