mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-10 21:26:11 -04:00
docs(admin): add wordpress docs (#552)
Closes #551 Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
93e2447ba2
commit
0a56194825
39
docs/docs/admin/frameworks/wordpress.mdx
Normal file
39
docs/docs/admin/frameworks/wordpress.mdx
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Wordpress
|
||||||
|
|
||||||
|
Wordpress is the most popular blog engine on the planet.
|
||||||
|
|
||||||
|
## Using a multi-site setup with Anubis
|
||||||
|
|
||||||
|
If you have a multi-site setup where traffic goes through Anubis like this:
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
---
|
||||||
|
title: Apache as tls terminator and HTTP router
|
||||||
|
---
|
||||||
|
|
||||||
|
flowchart LR
|
||||||
|
T(User Traffic)
|
||||||
|
subgraph Apache 2
|
||||||
|
TCP(TCP 80/443)
|
||||||
|
US(TCP 3001)
|
||||||
|
end
|
||||||
|
|
||||||
|
An(Anubis)
|
||||||
|
B(Backend)
|
||||||
|
|
||||||
|
T --> |TLS termination| TCP
|
||||||
|
TCP --> |Traffic filtering| An
|
||||||
|
An --> |Happy traffic| US
|
||||||
|
US --> |whatever you're doing| B
|
||||||
|
```
|
||||||
|
|
||||||
|
Wordpress may not realize that the underlying connection is being done over HTTPS. This could lead to a redirect loop in the `/wp-admin/` routes. In order to fix this, add the following to your `wp-config.php` file:
|
||||||
|
|
||||||
|
```php
|
||||||
|
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||||
|
$_SERVER['HTTPS'] = 'on';
|
||||||
|
$_SERVER['SERVER_PORT'] = 443;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This will make Wordpress think that your connection is over HTTPS instead of plain HTTP.
|
Loading…
x
Reference in New Issue
Block a user