Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lighttpd reverse proxy config to the wiki #1643

Closed
jonesaaronj opened this issue Apr 18, 2020 · 3 comments
Closed

Add lighttpd reverse proxy config to the wiki #1643

jonesaaronj opened this issue Apr 18, 2020 · 3 comments

Comments

@jonesaaronj
Copy link

How about adding the reverse proxy config for lighttpd. It took me some time to figure it out and thought others might want it too.

$HTTP["url"] =~ "^/glances" {
    url.rewrite-once = ( "^(/glances)$" => "$1/" )
    proxy.server = ("" => (( "host" => "localhost", "port" => 61208 )))
    proxy.header = ( "map-urlpath" => ( "/glances" => "" ) )
}
@nicolargo nicolargo added this to the Glances 3.1.5 milestone Apr 26, 2020
@nicolargo
Copy link
Owner

@p1r473
Copy link

p1r473 commented Sep 14, 2021

@jonesaaronj I added this into /etc/lighttpd/conf-available/ and made a symlink to /etc/lighttpd/conf-enabled/
its sort of working because when I view the source the URL I get:
image
But the page is totally blank
image
Hitting it on 61208 like normal works fine

Looks like the Javascript isnt loading?

I've tried adding
server.document-root = "/usr/local/lib/python3.7/dist-packages/glances/outputs/static/public"
But no luck yet. How do you get Lighttps to use the right directory for the javascript?

Im piggybacking the Lighttpd installation from my PiHole

@p1r473
Copy link

p1r473 commented Sep 14, 2021

I ended up just listening on a different port. Rewriting the /glances was also messing up the javascript path

$SERVER["socket"] == ":88" {
    server.document-root        = "/usr/local/lib/python3.7/dist-packages/glances/outputs/static/public"
    proxy.server = ("" => (( "host" => "localhost", "port" => 61208 )))
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants