[PR #367] [CLOSED] Adding S3 host option #3231

Closed
opened 2026-02-26 07:38:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/367
Author: @dpanesso
Created: 4/14/2020
Status: Closed

Base: developHead: dev-s3-host


📝 Commits (1)

📊 Changes

11 files changed (+101 additions, -117 deletions)

View changed files

backend/migrations/20200409182508_s3_host.js (+42 -0)
📝 backend/schema/definitions.json (+5 -0)
📝 backend/schema/endpoints/proxy-hosts.json (+13 -1)
backend/templates/_s3_host.conf (+15 -0)
📝 backend/templates/proxy_host.conf (+4 -0)
📝 frontend/js/app/nginx/proxy/form.ejs (+11 -2)
📝 frontend/js/app/nginx/proxy/form.js (+1 -0)
📝 frontend/js/app/nginx/proxy/location-item.ejs (+2 -2)
📝 frontend/js/i18n/messages.json (+1 -0)
📝 frontend/js/models/proxy-host.js (+1 -0)
📝 frontend/yarn.lock (+6 -112)

📄 Description

This PR allows to define an S3 host. We use this very often to serve static hosting from our AWS S3 buckets. It references #357.

It uses this location block to serve the S3 bucket content:

        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.

This is what it looks like:

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/367 **Author:** [@dpanesso](https://github.com/dpanesso) **Created:** 4/14/2020 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `dev-s3-host` --- ### 📝 Commits (1) - [`6fb7091`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/6fb7091d3e142ad1458dbc16cf00420fa006a082) Adding S3 host option ### 📊 Changes **11 files changed** (+101 additions, -117 deletions) <details> <summary>View changed files</summary> ➕ `backend/migrations/20200409182508_s3_host.js` (+42 -0) 📝 `backend/schema/definitions.json` (+5 -0) 📝 `backend/schema/endpoints/proxy-hosts.json` (+13 -1) ➕ `backend/templates/_s3_host.conf` (+15 -0) 📝 `backend/templates/proxy_host.conf` (+4 -0) 📝 `frontend/js/app/nginx/proxy/form.ejs` (+11 -2) 📝 `frontend/js/app/nginx/proxy/form.js` (+1 -0) 📝 `frontend/js/app/nginx/proxy/location-item.ejs` (+2 -2) 📝 `frontend/js/i18n/messages.json` (+1 -0) 📝 `frontend/js/models/proxy-host.js` (+1 -0) 📝 `frontend/yarn.lock` (+6 -112) </details> ### 📄 Description This PR allows to define an S3 host. We use this very often to serve static hosting from our AWS S3 buckets. It references #357. It uses this location block to serve the S3 bucket content: ``` 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. This is what it looks like: ![image](https://user-images.githubusercontent.com/2687121/78966237-dee5c400-7ac4-11ea-8f9f-e512f7715bd4.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 07:38:33 +03:00
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#3231
No description provided.