2025-12-23 16:17:54deseven:
added headers to all reverse proxy configs, updated configuration section
configuration.md ..
@@ 155,8 155,8 @@
### Reverse Proxy and IPs
-
Running the docker container behind a reverse proxy will show only the IP of the reverse proxy in the log files. With setting `REAL_IP_FROM` to the ip address of the reverse proxy, the IPs of the connection clients will be logged.
+
Running the docker container behind a reverse proxy will show only the IP of the reverse proxy in the log files. With setting `REAL_IP_FROM` to the ip address or network of the reverse proxy, the IPs of the connection clients will be logged.
client_max_body_size 64M; # for attachments of a size up to 64 Mb
}
@@ 261,15 264,20 @@
It's assumed that An Otter Wiki is running either in a docker container or as a uwsgi process and listening on port 8080.
-
```
+
```apache
<VirtualHost *:*>
ServerName wiki.domain.tld
ProxyPreserveHost On
ProxyPass / http://0.0.0.0:8080/
ProxyPassReverse / http://0.0.0.0:8080/
+
ProxyAddHeaders On
+
RequestHeader set X-Forwarded-Proto "http"
+
RequestHeader set X-Real-IP %{REMOTE_ADDR}e
</VirtualHost>
```
+
If you're using HTTPS, change `X-Forwarded-Proto "http"` to `X-Forwarded-Proto "https"` and `RequestHeader set X-Real-IP %{REMOTE_ADDR}e` to `RequestHeader set X-Real-IP %{REMOTE_ADDR}s`.