%PDF- %PDF-
Direktori : /backups/router/var/etc/ |
Current File : //backups/router/var/etc/lighty-webConfigurator.conf |
# # lighttpd configuration file # # use a it as base for lighttpd 1.0.0 and above # ############ Options you really have to take care of #################### ## modules to load server.modules = ( "mod_access", "mod_expire", "mod_deflate", "mod_redirect", "mod_setenv", "mod_cgi", "mod_fastcgi", "mod_alias", "mod_rewrite", "mod_openssl" ) # additional optional modules to load or additional module configurations include "/usr/local/etc/lighttpd_webgui/conf.d/*.conf" server.max-keep-alive-requests = 15 server.max-keep-alive-idle = 30 ## a static document-root, for virtual-hosting take look at the ## server.virtual-* options server.document-root = "/usr/local/www/" server.tag = "OPNsense" # Phalcon ui and api routing alias.url += ( "/ui/" => "/usr/local/opnsense/www/" ) alias.url += ( "/api/" => "/usr/local/opnsense/www/" ) url.rewrite-if-not-file = ( "^/ui/([^\?]+)(\?(.*))?" => "/ui/index.php?$3" , "^/api/([^\?]+)(\?(.*))?" => "/api/api.php?$3" ) # Maximum idle time with nothing being written (php downloading) server.max-write-idle = 999 # Set shutdown time to 2 seconds for SIGINT handling server.feature-flags = ( "server.graceful-shutdown-timeout" => 2 ) ## where to send error/access-messages to server.syslog-facility = "daemon" server.errorlog-use-syslog="enable" # files to check for if .../ is requested server.indexfiles = ( "index.php", "index.html", "index.htm", "default.htm" ) # mimetype mapping mimetype.assign = ( "wpad.dat" => "application/x-ns-proxy-autoconfig", ".pdf" => "application/pdf", ".sig" => "application/pgp-signature", ".spl" => "application/futuresplash", ".class" => "application/octet-stream", ".ps" => "application/postscript", ".torrent" => "application/x-bittorrent", ".dvi" => "application/x-dvi", ".gz" => "application/x-gzip", ".pac" => "application/x-ns-proxy-autoconfig", ".swf" => "application/x-shockwave-flash", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".tar" => "application/x-tar", ".zip" => "application/zip", ".mp3" => "audio/mpeg", ".m3u" => "audio/x-mpegurl", ".wma" => "audio/x-ms-wma", ".wax" => "audio/x-ms-wax", ".ogg" => "audio/x-wav", ".wav" => "audio/x-wav", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".svg" => "image/svg+xml", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", ".css" => "text/css", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", ".asc" => "text/plain", ".c" => "text/plain", ".conf" => "text/plain", ".text" => "text/plain", ".txt" => "text/plain", ".dtd" => "text/xml", ".xml" => "text/xml", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", ".mov" => "video/quicktime", ".qt" => "video/quicktime", ".avi" => "video/x-msvideo", ".asf" => "video/x-ms-asf", ".asx" => "video/x-ms-asf", ".wmv" => "video/x-ms-wmv", ".bz2" => "application/x-bzip", ".tbz" => "application/x-bzip-compressed-tar", ".tar.bz2" => "application/x-bzip-compressed-tar" ) # Use the "Content-Type" extended attribute to obtain mime type if possible #mimetypes.use-xattr = "enable" ## deny access the file-extensions # # ~ is for backupfiles from vi, emacs, joe, ... # .core is for core dumps that may be created during PHP execution # .inc is often used for code includes which should in general not be part # of the document-root url.access-deny = ( "~", , ".core", ".inc" ) ######### Options that are good to be but not necessary to be changed ####### ## bind to port (default: 80) server.bind = "0.0.0.0" server.port = 443 ## ssl configuration ssl.engine = "enable" ssl.privkey = "/var/etc/key.pem" ssl.pemfile = "/var/etc/cert.pem" ssl.openssl.ssl-conf-cmd = ( "MinProtocol" => "TLSv1.2", "Options" => "-ServerPreference", "CipherString" => "EECDH+AESGCM:AES256+EECDH:CHACHA20:!SHA1:!SHA256:!SHA384" ) $SERVER["socket"] == "0.0.0.0:443" { $HTTP["url"] =~ "^/api/" { server.stream-response-body = 2 } ssl.engine = "enable" } $SERVER["socket"] == "[::]:443" { $HTTP["url"] =~ "^/api/" { server.stream-response-body = 2 } ssl.engine = "enable" } ## error-handler for status 404 #server.error-handler-404 = "/error-handler.html" server.error-handler-404 = "/ui/404" ## to help the rc.scripts server.pid-file = "/var/run/lighty-webConfigurator.pid" ## enable debugging debug.log-request-header = "disable" debug.log-response-header = "disable" debug.log-request-handling = "disable" debug.log-file-not-found = "disable" # compression deflate.mimetypes = ("text/plain", "text/css", "text/javascript", "text/xml") deflate.allowed-encodings = ( "br", "gzip", "deflate" ) deflate.cache-dir = "/tmp/lighttpdcompress/" server.upload-dirs = ( "/root/", "/tmp/", "/var/" ) server.max-request-size = 2097152 #### fastcgi module ## read fastcgi.txt for more info fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php-fastcgi.socket", "max-procs" => 2, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "20", "PHP_FCGI_MAX_REQUESTS" => "100" ), "bin-path" => "/usr/local/bin/php-cgi" ) ) ) cgi.assign = ( ".cgi" => "" ) expire.url = ( "" => "access 50 hours" ) $SERVER["socket"] == "0.0.0.0:80" { $HTTP["host"] =~ "(.*)" { url.redirect = ( "^/(.*)" => "https://%1/$1" ) } ssl.engine = "disable" } $SERVER["socket"] == "[::]:80" { $HTTP["host"] =~ "(.*)" { url.redirect = ( "^/(.*)" => "https://%1/$1" ) } ssl.engine = "disable" }