-
-
Save LittleFreak/2de581c6f96c441bd5f230283fa779e1 to your computer and use it in GitHub Desktop.
Lighttpd Default Configuration File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server.port = 80 | |
| #server.bind = "" | |
| server.tag ="lighttpd" | |
| server.modules = ( | |
| "mod_access", | |
| "mod_alias", | |
| "mod_accesslog", | |
| # "mod_deflate", | |
| "mod_expire", | |
| "mod_redirect", | |
| "mod_rewrite" | |
| ) | |
| server.document-root = "/var/www/" | |
| index-file.names = ( "index.php", "index.py", "index.html" ) | |
| accesslog.filename = "/var/log/lighttpd/access.log" | |
| server.errorlog = "/var/log/lighttpd/error.log" | |
| server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) | |
| server.username = "www-data" | |
| server.groupname = "www-data" | |
| server.pid-file = "/var/run/lighttpd.pid" | |
| ## Deny access to the source code of these files: | |
| static-file.exclude-extensions = ( ".php", ".pl", ".py", ".fcgi" ) | |
| ## Deny access the file-extensions | |
| url.access-deny = ( "~", ".inc" ) | |
| ## Enable/Disable Directory Listings | |
| dir-listing.encoding = "utf-8" | |
| dir-listing.activate = "disable" | |
| dir-listing.hide-dotfiles = "enable" | |
| ## eTags | |
| etag.use-inode = "enable" | |
| etag.use-mtime = "enable" | |
| etag.use-size = "enable" | |
| static-file.etags = "enable" | |
| ## Compress module | |
| compress.cache-dir = "/var/cache/lighttpd/compress/" | |
| compress.filetype = ( "text/plain", "text/html", "text/css", "text/xml", "text/x-js", "text/javascript", "application/x-javascript", "application/javascript" ) | |
| ## Expire Models | |
| $HTTP["url"] =~ "(css|js|png|jpg|ico|gif)$" { | |
| expire.url = ( "" => "access 7 days" ) | |
| } | |
| #expire.url = ( | |
| # "/images/" => "access plus 7 days", | |
| # "/jquery/" => "access plus 2 weeks", | |
| # "/js/" => "access plus 2 months", | |
| # "/misc" => "access plus 1 days", | |
| # "/themes/" => "access plus 7 days", | |
| # "/modules/" => "access plus 24 hours" | |
| #) | |
| ## Enable PHP | |
| fastcgi.server = ( ".php" => (( | |
| "bin-path" => "/usr/bin/php-cgi", | |
| "socket" => "/tmp/php.socket" | |
| ))) | |
| ## Load enabled configuration files | |
| include_shell "/usr/share/lighttpd/include-conf-enabled.pl" | |
| include_shell "/usr/local/share/lighttpd/include-sites-enabled.pl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment