How to use lighttpd mod_proxy with ttyd?
I'm trying to use lighttpd with ttyd to let users access ttyd GUI directly.
ttyd is running on port 8080:
ttyd -p 8080 bash
And lighttpd mod_proxy setting is as following:
server.modules += ( "mod_proxy" ) $HTTP["url"] =~ "^/websockify" { proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => "8080" ) ) ) proxy.header = ( "upgrade" => "enable" ) }
But when I try to acess http://x.x.x.x/websockify, there's "404" shown on the web.
Does anyone can help me?
Replies (1)
RE: How to use lighttpd mod_proxy with ttyd? - Added by gstrauss 8 months ago
But when I try to acess http://x.x.x.x/websockify, there's "404" shown on the web.
If this is as "far" as you have gotten, then you are posting before making any effort to actually troubleshoot this yourself. It sounds like you have done nothing on the server to see what is going on, so please start with How to get support and look in your lighttpd errorlog.
Did you check if it works with http://x.x.x.x:8080/ ? You probably do not want to expose that to the internet. ttyd supports -i and a unix domain socket, and lighttpd can reverse proxy to a unix domain socket.