-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
Behind Apache httpd Proxy #345
Comments
I guess it's too late but I'll try :) This one seems correct to me:
The port number here needs to be one to use for generating URLs, and given you're fronting it all with Apache on port 80 it should work like that. What error do you get when the player doesn't start with these settings? |
@sickill I am facing a similar issue. I'm not using apache but nginx instead. I have a Linux server that runs nginx as a reverse proxy, proxying multiple applications that each run on their own port (they may or may not run in docker containers). Because of that very use case doing rewrites (for the "/") is only possible once so this is a not a valid solution for my use case. Is it possible to fix the source code instead to use relative paths instead of absolutes for all static/asset information? This should be fixed at the application level not at a deployment level IMHO. This would fix the original issue with apache as well and no rewrites should be needed. Big thank you in advance! |
Like @ku1ik said this seems wrong:
The
doesn't work because the way it's now configured should have this in the
Just don't change the port using the variables at all and instead use docker to do it for you:
Also you should change the host as
I just set URL_HOST=asciinema.myserver.com
URL_SCHEME=https labels:
- traefik.http.routers.asciinema.rule=Host(`asciinema.myserver.com`)
- traefik.http.routers.asciinema.entrypoints=websecure # Port 443
- traefik.http.routers.asciinema.tls.certresolver=lets-encrypt # Enable SSL between proxy and internet
- traefik.http.routers.asciinema.service=asciinema
- traefik.http.services.asciinema.loadBalancer.server.port=4000 # What port to connect to in the container. You'll have to expose it like I said above AFAIK the server doesn't care what you set the variables to. It uses it for generating urls, etc. You can run it on the default port (like I do) and then just use docker + apache to set a different port and proxy it. Also your proxy config seems overly complicated. Just point the proxy to the server and enable SSL, nothing else should be needed. |
Why don't you use a subdomain like
It would be nice to have a subdir option as well but I've been using subdomains for almost everything and I find it more flexible and readable. For you it could be at least a temporary solution if you don't like the subdomain approach. |
I've just released new version of the server: https://github.com/asciinema/asciinema-server/releases/tag/v20240515 One related change in this release is changing of the URL used for fetching recordings in the player, from absolute URL to a local (absolute) path. This should help with any potential URL rewrites or cases where the However, it's essential to configure |
Given the last remaining asset (the recording file) is now served using a path instead of a full URL I think there's nothing more to fix on the code side, and I'm going to close this. If you'd like to discuss your setup further feel free to start a topic on asciinema forum. Thanks! |
@sickill - First lots of thanks for Asciinema.
This is not an ideal case but this is what I have:
asciinema-server
using docker-compose with following env vars in.env.production
In above -
I needed to add
SetOutputFilter INFLATE;proxy-html;DEFLATE
since it appeared that the response was compressed.So - The site works fine as SSL termination is at the apache httpd level and not at the nginx.
Issue - 1
The issue is - when email comes after login - the url has
http://localhost:18880
.Issue - 2
I tried using the following in
.env.production
The email that comes has above URL but asciinema player breaks it does not start.
Is there something that you can suggest for the config or env vars? I am close and thanks for your insight.
The text was updated successfully, but these errors were encountered: