File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 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
1616
1717# Set reverse proxy domain
1818ENV REVERSE_DOMAIN example.com
19+ ENV REVERSE_PROTO http
1920
2021# Expose and start
2122EXPOSE 80
Original file line number Diff line number Diff line change @@ -13,13 +13,14 @@ http {
1313 listen 80 ;
1414
1515 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 ;
1818 proxy_redirect off;
1919 proxy_buffering off;
20- proxy_set_header Host _REPLACE_ME_ ;
20+ proxy_set_header Host _REPLACE_ME_HOST_ ;
2121 proxy_set_header X-Real-IP $remote_addr ;
2222 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
23+ proxy_intercept_errors on;
2324 }
2425 }
2526}
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33echo " 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
56
67echo " Starting Nginx Reverse Proxy..."
78exec /usr/sbin/nginx & tail -F /var/log/nginx/*
You can’t perform that action at this time.
0 commit comments