Skip to content

Commit 22a0cb7

Browse files
author
Bennett Goble
committed
Add SERVER_NAME option
1 parent 0a1495d commit 22a0cb7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Pair nginx-proxy with your favorite upstream server (wsgi, uwsgi, asgi, et al.)
88

99
| Environment Variable | Description | Required | Default | Example |
1010
|----------------------|-------------|----------|---------|---------|
11+
| `LISTEN_PORT` | Server port | Yes | 80 | |
1112
| `PROXY_REVERSE_URL` | Upstream server URL | Yes | | http://myapp:8080 |
12-
| `LISTEN_PORT` | Server port | Yes | 8080 | |
13+
| `SERVER_NAME` | Allowed server names (hostnames) | Yes | | |
1314
| `SILENT` | Silence entrypoint output | No | | |
1415
| `STATIC_LOCATIONS` | Static asset mappings | No | | |
1516

src/etc/nginx/templates/default.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
server {
22
listen {{ .Env.LISTEN_PORT }};
3-
server_name _;
3+
server_name {{ .Env.SERVER_NAME }};
44
add_header X-Request-ID $request_id;
55

66
# Security Headers

0 commit comments

Comments
 (0)