[Solved] Need help configuring lighttpd as proxy for gotify server
Added by zac@zacwolf.com about 1 month ago
Hi, I'm trying to write a lighttpd configuration to proxy for my Gotify server running on port 70 [http://gotify.net]
So far, I have tried:
server.modules += ( "mod_proxy" )
$HTTP["url"] =~ "^/gotify" {
accesslog.filename = "/var/log/gotify.log"
server.errorlog = "/var/log/gotify.error.log"
proxy.server = (
"" => ( (
"host" => "192.168.1.1",
"port" => 70
) )
)
proxy.header = ( "upgrade" => "enable" )
proxy.forwarded = ( "for" => 1,
"proto" => 1,
"host" => 1,
"by" => 1,
#"remote_user" => 1
)
}
But when I access http://{lighttpd_server_IP}/gotify, I get the following error:
{"error":"Not Found","errorCode":404,"errorDescription":"page not found"}
Some example gotify proxy server configurations are available for other front-ends:
nginx: https://gotify.net/docs/nginx
apache: https://gotify.net/docs/apache
Any suggestions on what I might be missing?
Replies (2)
RE: Need help configuring lighttpd as proxy for gotify server - Added by gstrauss about 1 month ago
You probably do not need proxy.forwarded
You might need proxy.headers += ("https-remap" => "enable")
, though I don't think so at first glance.
If you configure /gotify as a subpath, then you probably do need to configure "map-urlpath"
similar to the subpath example in the nginx link you provided.
e.g. proxy.header += ("map-urlpath" => ("/gotify" => "") )
RE: Need help configuring lighttpd as proxy for gotify server - Added by zac@zacwolf.com about 1 month ago
Excellent, thank you so much; that did the trick!
I was hoping it was something simple. So basically the
$HTTP["url"] =~ "^/gotify"
is for the lighttpd server, and the
proxy.header += ("map-urlpath" => ("/gotify" => "")
...is to inform the mod_proxy module of how you access/map the proxy?
Makes sense!
THANKS!