Skip to content

Commit

Permalink
Review: Do not discard paths other than '/errors/' and '/.well-known/…
Browse files Browse the repository at this point in the history
…acme-challenge/' on redirect/proxy (Apache2)
  • Loading branch information
nuxwin committed May 31, 2018
1 parent bb8c839 commit 9cc28c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CONFIG
Fixed: Bad value for X-Forward-* headers (Proxy feature / Apache2 ssl vhosts) -- Backported from 1.6.x
Security: Protect both /var/www/virtual and /var/www/imscp directories from entire access (Apache2)
Review: SSL parameters for both Apache2 and Nginx Web servers
Review: Do not discard paths other than '/errors/' and '/.well-known/acme-challenge/' on redirect/proxy (Apache2)

DISTRIBUTION
Added: Support for Ubuntu Bionic Beaver (18.04) LTS
Expand Down
4 changes: 2 additions & 2 deletions configs/debian/apache/parts/domain.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
</Directory>

# SECTION std_fwd BEGIN.
RedirectMatch {FORWARD_TYPE} ^/((?!(?:errors|\.well-known)/).*) {FORWARD}$1
RedirectMatch {FORWARD_TYPE} ^/((?!(?:errors/|\.well-known)/acme-challenge/).*) {FORWARD}$1
# SECTION std_fwd END.
# SECTION proxy_fwd BEGIN.
# SECTION ssl_proxy BEGIN.
Expand All @@ -117,7 +117,7 @@
RequestHeader set X-Forwarded-Proto "{X_FORWARDED_PROTOCOL}"
RequestHeader set X-Forwarded-Port {X_FORWARDED_PORT}
ProxyPreserveHost {FORWARD_PRESERVE_HOST}
ProxyPassMatch ^/((?!(?:errors|\.well-known)/).*) {FORWARD}$1 retry=30 timeout=7200
ProxyPassMatch ^/((?!(?:errors/|\.well-known)/acme-challenge/).*) {FORWARD}$1 retry=30 timeout=7200
ProxyPassReverse / {FORWARD}
# SECTION proxy_fwd END.
# SECTION fwd END.
Expand Down
2 changes: 1 addition & 1 deletion configs/debian/apache/parts/domain_disabled.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
# SECTION dmn END.

# SECTION fwd BEGIN.
RedirectMatch {FORWARD_TYPE} ^/((?!\.well-known/).*) {FORWARD}$1
RedirectMatch {FORWARD_TYPE} ^/((?!\.well-known/acme-challenge/).*) {FORWARD}$1
# SECTION fwd END.
</VirtualHost>

0 comments on commit 9cc28c8

Please sign in to comment.