diff options
| author | EuAndreh <eu@euandre.org> | 2024-03-01 16:09:56 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-03-01 16:11:17 -0300 |
| commit | 013f9222f3134460a43fd79446b59237916cf0c3 (patch) | |
| tree | 8d83c437c215f4b8260f513820830ebfcd326ee3 /tests | |
| parent | src/web.mjs: Try out new hero API (diff) | |
| download | papod-013f9222f3134460a43fd79446b59237916cf0c3.tar.gz papod-013f9222f3134460a43fd79446b59237916cf0c3.tar.xz | |
Setup user-level lighttpd reverse proxy for development and testing
Add static files as in production, too.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lighttpd.conf | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/lighttpd.conf b/tests/lighttpd.conf new file mode 100644 index 0000000..5438366 --- /dev/null +++ b/tests/lighttpd.conf @@ -0,0 +1,32 @@ +server.modules += ( + "mod_proxy", + "mod_accesslog", +) + +server.bind = var.CWD + "/lighttpd.sock" +server.document-root = var.CWD + "/src/static/" + +server.errorlog = "/dev/stderr" +server.breakagelog = "/dev/stderr" +accesslog.filename = "/dev/stderr" + +accesslog.format = "" +accesslog.format += "{ " +accesslog.format += "\"tool\": " + "\"lighttpd\", " +accesslog.format += "\"http-host\": " + "\"%V\", " +accesslog.format += "\"remote-addr\": " + "\"%h\", " +accesslog.format += "\"remote-user\": " + "\"%u\", " +accesslog.format += "\"request-method\": " + "\"%m\", " +accesslog.format += "\"request\": " + "\"%r\", " +accesslog.format += "\"status\": " + "%s, " +accesslog.format += "\"body-bytes-sent\": " + "\"%b\", " +accesslog.format += "\"duration-usec\": " + "%D, " +accesslog.format += "\"http-referrer\": " + "\"%{Referer}i\", " +accesslog.format += "\"http-user-agent\": " + "\"%{User-Agent}i\" " +accesslog.format += "}" + +index-file.names = ( "index.html" ) + +$HTTP["url"] =~ "^/api/" { + proxy.server = ( "" => (( "host" => var.CWD + "/web.sock" ))) +} |
