]>
Commit | Line | Data |
---|---|---|
d00306fe | 1 | server.modules = ( "mod_rewrite", "mod_alias", "mod_access", "mod_auth", "mod_proxy_core", "mod_proxy_backend_fastcgi", "mod_redirect", "mod_magnet", "mod_accesslog" ) |
a12280f7 | 2 | server.errorlog = "/var/log/lighttpd/error_log" |
a30bf1b7 JP |
3 | #$HTTP["useragent"] !~ "^check_http" { |
4 | # accesslog.filename = "/var/log/lighttpd/access_log" | |
5 | #} | |
a12280f7 JP |
6 | etag.use-inode = "disable" |
7 | index-file.names = ( "index.php", "index.html" ) | |
a12280f7 | 8 | url.access-deny = ( "~", ".inc", ".svn", "CVS" ) |
0c349980 | 9 | static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) |
a12280f7 | 10 | server.port = 80 |
a12280f7 JP |
11 | server.pid-file = "/var/run/lighttpd.pid" |
12 | server.username = "lighttpd" | |
a30bf1b7 | 13 | server.groupname = "apache" |
585b537e JP |
14 | |
15 | $PHYSICAL["existing-path"] =~ "\.php$" { | |
16 | proxy-core.balancer = "round-robin" | |
17 | proxy-core.allow-x-sendfile = "enable" | |
18 | proxy-core.protocol = "fastcgi" | |
19 | proxy-core.backends = ( "unix:/tmp/php-fastcgi.sock" ) | |
20 | proxy-core.max-pool-size = 4 | |
21 | } | |
a12280f7 | 22 | |
82981855 JP |
23 | server.document-root = "/srv/web/home/" |
24 | alias.url = ( "/~sql" => "/srv/web" ) | |
25 | alias.url += ( "/main" => "/srv/web/main" ) | |
26 | alias.url += ( "/dev" => "/srv/web/dev" ) | |
27 | alias.url += ( "/tools" => "/srv/web/tools" ) | |
28 | #alias.url += ( "/" => "/srv/web/home" ) | |
a12280f7 JP |
29 | url.rewrite-once = ( "^/tools/([^\?]+)(\??.*)" => "/tools/$1.php$2" ) |
30 | url.rewrite-once += ( "^/~sql/main/do/([^\?]+)(\??.*)" => "/~sql/main/$1.php$2" ) | |
0c349980 JP |
31 | url.rewrite-once += ( "^/~sql/dev/do/([^\?]+)(\??.*)" => "/~sql/dev/$1.php$2" ) |
32 | url.rewrite-once += ( "^/main/do/([^\?]+)(\??.*)" => "/main/$1.php$2" ) | |
33 | url.rewrite-once += ( "^/dev/do/([^\?]+)(\??.*)" => "/dev/$1.php$2" ) | |
794cf93a | 34 | url.redirect = ( "^/phpMyAdmin(.*)" => "http://scripts.mit.edu/~sql/phpMyAdmin$1" ) |
d00306fe | 35 | |
a12280f7 | 36 | ssl.verifyclient.username = "SSL_CLIENT_S_DN_emailAddress" |
0c349980 | 37 | $SERVER["socket"] == "0.0.0.0:443" { |
a30bf1b7 | 38 | server.document-root = "/srv/www/root/" |
a12280f7 | 39 | ssl.engine = "enable" |
27a83527 | 40 | ssl.pemfile = "/etc/lighttpd/sql.mit.edu.pem" |
a12280f7 JP |
41 | ssl.ca-file = "/etc/lighttpd/mitCAclient.pem" |
42 | ssl.verifyclient.activate = "enable" | |
43 | ssl.verifyclient.enforce = "disable" | |
44 | ssl.verifyclient.depth = 2 | |
d00306fe | 45 | |
a30bf1b7 JP |
46 | url.redirect += ( "^/$" => "/manage/" ) |
47 | $HTTP["url"] =~ "^/manage(/|$)" { | |
48 | proxy-core.balancer = "round-robin" | |
49 | proxy-core.protocol = "fastcgi" | |
50 | proxy-core.backends = ( "unix:/srv/var/run/interface.sock" ) | |
51 | proxy-core.max-pool-size = 4 | |
52 | proxy-core.rewrite-request = ( | |
53 | "_pathinfo" => ( "^/manage(/.*)" => "$1" ), | |
54 | "_scriptname" => ( "^(/manage/)" => "$1" ) | |
55 | ) | |
d00306fe | 56 | } |
0c349980 | 57 | } |
d00306fe | 58 | |
0c349980 | 59 | mimetype.assign = ( |
a12280f7 JP |
60 | ".gz" => "application/x-gzip", |
61 | ".tar.gz" => "application/x-tgz", | |
62 | ".tgz" => "application/x-tgz", | |
63 | ".tar" => "application/x-tar", | |
64 | ".gif" => "image/gif", | |
65 | ".jpg" => "image/jpeg", | |
66 | ".jpeg" => "image/jpeg", | |
67 | ".png" => "image/png", | |
68 | ".css" => "text/css", | |
69 | ".html" => "text/html", | |
70 | ".htm" => "text/html", | |
71 | ".js" => "text/javascript", | |
72 | ".asc" => "text/plain", | |
73 | ".c" => "text/plain", | |
74 | ".cpp" => "text/plain", | |
75 | ".log" => "text/plain", | |
76 | ".conf" => "text/plain", | |
77 | ".text" => "text/plain", | |
78 | ".txt" => "text/plain", | |
79 | ".dtd" => "text/xml", | |
80 | ".xml" => "text/xml", | |
81 | ".bz2" => "application/x-bzip", | |
82 | ".tbz" => "application/x-bzip-compressed-tar", | |
83 | ".tar.bz2" => "application/x-bzip-compressed-tar" | |
0c349980 | 84 | ) |