|
19 | 19 | # modules, e.g. |
20 | 20 | #LogLevel debug |
21 | 21 |
|
| 22 | + RemoteIPHeader X-Forwarded-For |
| 23 | + # Cloudflare IPs |
| 24 | + # https://support.cloudflare.com/hc/en-us/articles/360029696071 |
| 25 | + # IPv4: https://www.cloudflare.com/ips-v4 |
| 26 | + RemoteIPTrustedProxy 173.245.48.0/20 |
| 27 | + RemoteIPTrustedProxy 103.21.244.0/22 |
| 28 | + RemoteIPTrustedProxy 103.22.200.0/22 |
| 29 | + RemoteIPTrustedProxy 103.31.4.0/22 |
| 30 | + RemoteIPTrustedProxy 141.101.64.0/18 |
| 31 | + RemoteIPTrustedProxy 108.162.192.0/18 |
| 32 | + RemoteIPTrustedProxy 190.93.240.0/20 |
| 33 | + RemoteIPTrustedProxy 188.114.96.0/20 |
| 34 | + RemoteIPTrustedProxy 197.234.240.0/22 |
| 35 | + RemoteIPTrustedProxy 198.41.128.0/17 |
| 36 | + RemoteIPTrustedProxy 162.158.0.0/15 |
| 37 | + RemoteIPTrustedProxy 104.16.0.0/12 |
| 38 | + RemoteIPTrustedProxy 172.64.0.0/13 |
| 39 | + RemoteIPTrustedProxy 131.0.72.0/22 |
| 40 | + # IPv6: https://www.cloudflare.com/ips-v6 |
| 41 | + RemoteIPTrustedProxy 2400:cb00::/32 |
| 42 | + RemoteIPTrustedProxy 2606:4700::/32 |
| 43 | + RemoteIPTrustedProxy 2803:f800::/32 |
| 44 | + RemoteIPTrustedProxy 2405:b500::/32 |
| 45 | + RemoteIPTrustedProxy 2405:8100::/32 |
| 46 | + RemoteIPTrustedProxy 2a06:98c0::/29 |
| 47 | + RemoteIPTrustedProxy 2c0f:f248::/32 |
| 48 | + # lb0.productionwww.creativecommons.uk0.bigv.io |
| 49 | + RemoteIPTrustedProxy 5.28.62.166/32 |
| 50 | + # Local Varnish |
| 51 | + RemoteIPInternalProxy 127.0.0.1/32 |
| 52 | + |
| 53 | + LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" remoteip |
| 54 | + |
22 | 55 | ErrorLog ${APACHE_LOG_DIR}/error.log |
23 | | - CustomLog ${APACHE_LOG_DIR}/access.log combined |
| 56 | + CustomLog ${APACHE_LOG_DIR}/access.log remoteip |
24 | 57 |
|
25 | 58 | # For most configuration files from conf-available/, which are |
26 | 59 | # enabled or disabled at a global level, it is possible to |
|
34 | 67 | Options +Indexes |
35 | 68 | </Directory> |
36 | 69 |
|
37 | | - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined |
38 | | - SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded |
39 | | - CustomLog "/var/log/apache2/access.log" combined env=!forwarded |
40 | | - |
41 | 70 | # We're proxied through varnish, so drop idle connections quickly |
42 | 71 | KeepAlive Off |
43 | 72 |
|
|
0 commit comments