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

lighttpd reverse proxy configuration #72

Closed
graphixillusion opened this issue Jun 26, 2023 · 5 comments · Fixed by #75
Closed

lighttpd reverse proxy configuration #72

graphixillusion opened this issue Jun 26, 2023 · 5 comments · Fixed by #75
Labels
bug Something isn't working

Comments

@graphixillusion
Copy link

Hi there. As the title says i'm trying to make it works with a reverse proxy using lighttpd. I've tried with this configuration:

$HTTP["url"] =~ "^/opengist($|/)" {
  proxy.server = ( "" => ( (
    "host" => "127.0.0.1",
    "port" => 6157
  ) ) ),
  proxy.forwarded = ( "for" => 1,
                      "host" => 1,
                      "by" => 1
  ),
  proxy.header = (
      "map-urlpath" => (
         "/opengist/"  => "/",
         "/opengist" => ""
       )
  )
}

and i can reach the homepage but it cannot access all the other resources becouse it wants files from host/assets.

Any help? Thank you!

@thomiceli
Copy link
Owner

Hello, after investigation, it's quite normal that you can't access the assets, in fact the site links won't even work properly as each of them points to a URL that starts with /, so defining a sub url from your proxy would break the site.
The site urls should start with external-url from the config for example, i can work on that or you can open a PR if you want :)

@thomiceli
Copy link
Owner

One temporary solution would be to go for a sub domain instead.

@thomiceli thomiceli added the bug Something isn't working label Jun 28, 2023
@graphixillusion
Copy link
Author

One temporary solution would be to go for a sub domain instead.

Sadly i don't have control on the domain.

@graphixillusion
Copy link
Author

graphixillusion commented Jul 17, 2023

@thomiceli I've just tried the last version and i want to report that the website works, but when i try to make a new gist i get an error by nginx when i click on Create (both unlisted or public): the address returns on the main domain (without the /opengist) and i got the "405 Not Allowed" error. But if i try to make a new gist going to http:https://mydomain:port, it works and will redirect correctly to https://mydomain/opengist/opengistuser/gist

@graphixillusion
Copy link
Author

@thomiceli any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants