File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ RUN chmod 755 /*.sh
16
16
17
17
# Set reverse proxy domain
18
18
ENV REVERSE_DOMAIN example.com
19
+ ENV REVERSE_PROTO http
19
20
20
21
# Expose and start
21
22
EXPOSE 80
Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ http {
13
13
listen 80 ;
14
14
15
15
location / {
16
- proxy_pass http ://_REPLACE_ME_ /;
17
- proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404 http_403 http_300 http_301 http_303 ;
16
+ proxy_pass _REPLACE_ME_PROTO_ ://_REPLACE_ME_HOST_ /;
17
+ proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_403 http_404 ;
18
18
proxy_redirect off ;
19
19
proxy_buffering off ;
20
- proxy_set_header Host _REPLACE_ME_ ;
20
+ proxy_set_header Host _REPLACE_ME_HOST_ ;
21
21
proxy_set_header X-Real-IP $remote_addr ;
22
22
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
23
+ proxy_intercept_errors on ;
23
24
}
24
25
}
25
26
}
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
echo " Configuring Nginx Reverse Proxy..."
4
- sed -i " s/_REPLACE_ME_/$REVERSE_DOMAIN /g" /etc/nginx/nginx.conf
4
+ sed -i " s/_REPLACE_ME_HOST_/$REVERSE_DOMAIN /g" /etc/nginx/nginx.conf
5
+ sed -i " s/_REPLACE_ME_PROTO_/$REVERSE_PROTO /g" /etc/nginx/nginx.conf
5
6
6
7
echo " Starting Nginx Reverse Proxy..."
7
8
exec /usr/sbin/nginx & tail -F /var/log/nginx/*
You can’t perform that action at this time.
0 commit comments