Merge pull request #1175 from ArthurHoaro/docs/apache-proxy-preserve-host
Include ProxyPreserveHost directive in Apache's proxy doc
This commit is contained in:
commit
c9fcaaee93
1 changed files with 5 additions and 2 deletions
|
@ -13,12 +13,14 @@ This guide assumes that:
|
||||||
- [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html)
|
- [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html)
|
||||||
- [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers)
|
- [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers)
|
||||||
|
|
||||||
The following HTTP headers are set by using the `ProxyPass` directive:
|
The following HTTP headers are set when the `ProxyPass` directive is set:
|
||||||
|
|
||||||
- `X-Forwarded-For`
|
- `X-Forwarded-For`
|
||||||
- `X-Forwarded-Host`
|
- `X-Forwarded-Host`
|
||||||
- `X-Forwarded-Server`
|
- `X-Forwarded-Server`
|
||||||
|
|
||||||
|
The original `SERVER_NAME` can be sent to the proxied host by setting the [`ProxyPreserveHost`](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#ProxyPreserveHost) directive to `On`.
|
||||||
|
|
||||||
```apache
|
```apache
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName shaarli.domain.tld
|
ServerName shaarli.domain.tld
|
||||||
|
@ -37,6 +39,7 @@ The following HTTP headers are set by using the `ProxyPass` directive:
|
||||||
CustomLog /var/log/apache2/shaarli-access.log combined
|
CustomLog /var/log/apache2/shaarli-access.log combined
|
||||||
|
|
||||||
RequestHeader set X-Forwarded-Proto "https"
|
RequestHeader set X-Forwarded-Proto "https"
|
||||||
|
ProxyPreserveHost On
|
||||||
|
|
||||||
ProxyPass / http://127.0.0.1:10080/
|
ProxyPass / http://127.0.0.1:10080/
|
||||||
ProxyPassReverse / http://127.0.0.1:10080/
|
ProxyPassReverse / http://127.0.0.1:10080/
|
||||||
|
|
Loading…
Reference in a new issue