[GH-ISSUE #1029] Proxy single file #865

Closed
opened 2026-02-26 06:34:44 +03:00 by kerem · 6 comments
Owner

Originally created by @blackliner on GitHub (Apr 19, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1029

I would like to do something similar to get.docker.com, serve a static file that can be curl'd into bash to bootstrap some stuff. Is this possible with maybe custom nginx configs?

Preferably I would like to just forward this subdomain to a github raw file like this one:
https://github.com/blackliner/raspi_monitor/blob/main/install.sh

Originally created by @blackliner on GitHub (Apr 19, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1029 I would like to do something similar to get.docker.com, serve a static file that can be curl'd into bash to bootstrap some stuff. Is this possible with maybe custom nginx configs? Preferably I would like to just forward this subdomain to a github raw file like this one: https://github.com/blackliner/raspi_monitor/blob/main/install.sh
kerem 2026-02-26 06:34:44 +03:00
Author
Owner

@p-fruck commented on GitHub (May 3, 2021):

Hi,
I'm not working on this project but I might have a solution for you. Under Proxy Hosts -> Custom locations you can redirect a specific subfolder to another resource, eg. https://example.com/subfolder -> https://github.com/someblob
You can also set / to be the subfolder if you want to redirect example.com to the github blob.

Please let me know if this helped you 😉

<!-- gh-comment-id:831203491 --> @p-fruck commented on GitHub (May 3, 2021): Hi, I'm not working on this project but I might have a solution for you. Under `Proxy Hosts -> Custom locations` you can redirect a specific subfolder to another resource, eg. https://example.com/subfolder -> https://github.com/someblob You can also set `/` to be the subfolder if you want to redirect example.com to the github blob. Please let me know if this helped you :wink:
Author
Owner

@blackliner commented on GitHub (May 6, 2021):

Cool, it works for the page: setup.lauraundflorian.de

But I cant get the raw version to work, but might be a github issue

<!-- gh-comment-id:833352762 --> @blackliner commented on GitHub (May 6, 2021): Cool, it works for the page: [setup.lauraundflorian.de](http://setup.lauraundflorian.de) But I cant get the [raw version](https://raw.githubusercontent.com/blackliner/raspi_monitor/main/install.sh) to work, but might be a github issue
Author
Owner

@p-fruck commented on GitHub (May 6, 2021):

It seems to me like you are using a redirect host instead of a proxy host. Curl will (by default) not follow redirects. You can however tell curl to follow such redirects using curl -L example.com. If you use proxy hosts, you are not redirecting your http/s traffic, so it should work.
Keep in mind that you have to proxy your incoming http traffic to the raw github file! If you force SSL redirection on your host, you once again have to tell curl to use the -L flag!

Edit:
It does indeed not work out of the box by setting the location, but I have a have a configuration example for you.

  • Add a new proxy host
  • Set schema to http
  • Give it some host and port (the acutally do not matter if you rewrite / location)
  • In the advanced tab, add the following custom nginx config:
    location / {
        proxy_pass https://raw.githubusercontent.com/blackliner/raspi_monitor/main/install.sh;
        proxy_redirect off;
        add_header Content-Type text/plain;
    }
<!-- gh-comment-id:833398373 --> @p-fruck commented on GitHub (May 6, 2021): It seems to me like you are using a redirect host instead of a proxy host. Curl will (by default) not follow redirects. You can however tell curl to follow such redirects using `curl -L example.com`. If you use proxy hosts, you are not redirecting your http/s traffic, so it should work. Keep in mind that you have to proxy your incoming http traffic to the raw github file! If you force SSL redirection on your host, you once again have to tell curl to use the `-L` flag! **Edit:** It does indeed not work out of the box by setting the location, but I have a have a configuration example for you. * Add a new proxy host * Set schema to http * Give it some host and port (the acutally do not matter if you rewrite `/` location) * In the advanced tab, add the following custom nginx config: ```nginx location / { proxy_pass https://raw.githubusercontent.com/blackliner/raspi_monitor/main/install.sh; proxy_redirect off; add_header Content-Type text/plain; } ```
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

Maybe this helps: https://github.com/jc21/nginx-proxy-manager/issues/320

<!-- gh-comment-id:840170286 --> @chaptergy commented on GitHub (May 12, 2021): Maybe this helps: https://github.com/jc21/nginx-proxy-manager/issues/320
Author
Owner

@blackliner commented on GitHub (May 14, 2021):

Maybe this helps: #320

sweet, that did it!! thanks alot!

<!-- gh-comment-id:841334881 --> @blackliner commented on GitHub (May 14, 2021): > Maybe this helps: #320 sweet, that did it!! thanks alot!
Author
Owner

@github-actions[bot] commented on GitHub (Mar 13, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1993072421 --> @github-actions[bot] commented on GitHub (Mar 13, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#865
No description provided.