NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
21.99k stars 2.53k forks source link

Adding AWS S3 bucket hosting as an option #357

Open dpanesso opened 4 years ago

dpanesso commented 4 years ago

Is your feature request related to a problem? Please describe. We manage around 30 hosts on our nginx reverse proxy. About 1/3 of those are hosted on AWS S3. We need https on almost all of them and using something like Cloudfront to have SSL would be overkill.

Describe the solution you'd like Add an option on the Proxy hosts to use S3 as a forward option. This would change the location block to use the options needed for it to work. Something like this is what we use:

        proxy_http_version     1.1;
        proxy_set_header       Connection "";
        proxy_set_header       Authorization '';
        proxy_set_header       Host bucket.s3-website-us-east-1.amazonaws.com;
        proxy_hide_header      x-amz-id-2;
        proxy_hide_header      x-amz-request-id;
        proxy_hide_header      x-amz-meta-server-side-encryption;
        proxy_hide_header      x-amz-server-side-encryption;
        proxy_hide_header      Set-Cookie;
        proxy_ignore_headers   Set-Cookie;
        proxy_intercept_errors on;
        add_header             Cache-Control max-age=31536000;
        proxy_pass             http://bucket.s3-website-us-east-1.amazonaws.com/;

The maximum length of the forward_host variable would also have to be increased as 50 is too small.

Describe alternatives you've considered I considered using the custom location option but, the host parameter is set in the non editable section of proxy.conf

Additional context This would be my proposal:

image

I have made some progress on development. I can open a PR to check out my progress. I would consider some additional validations for it to be complete.

github-actions[bot] commented 5 months ago

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