From 3134fa77ee2977a17c5cc49152ec352429344f4a Mon Sep 17 00:00:00 2001 From: Marcel <110860055+Morethanevil@users.noreply.github.com> Date: Fri, 26 Apr 2024 15:21:27 +0200 Subject: [PATCH] Updated Troubleshooting Workarounds (markdown) --- Troubleshooting----Workarounds.md | 313 +++++++++--------------------- 1 file changed, 90 insertions(+), 223 deletions(-) diff --git a/Troubleshooting----Workarounds.md b/Troubleshooting----Workarounds.md index 213fa36..48f8841 100644 --- a/Troubleshooting----Workarounds.md +++ b/Troubleshooting----Workarounds.md @@ -1,3 +1,92 @@ +# Synapse (Matrix) nginx delegation example for Zoraxy + +``` +server { + listen 8200; + listen [::]:8200; + server_name MATRIX.YOUR.DOMAIN; + + location /.well-known/matrix/server { + add_header Access-Control-Allow-Origin '*'; + return 200 '{ "m.server": "MATRIX.YOUR.DOMAIN:443" }'; + } + + location /.well-known/matrix/client { + # If your sever_name here doesn't match your matrix homeserver URL + # (e.g. hostname.com as server_name and matrix.hostname.com as homeserver URL) + add_header Access-Control-Allow-Origin '*'; + return 200 '{ "m.homeserver": { "base_url": "https://MATRIX.YOUR.DOMAIN" } }'; + } + + location /_matrix { + proxy_pass http://172.40.0.50:8008; + } +} +``` + +# Fixing Wordpress "Mixed content" or "CSP header" errors + +Apache needs to be informed, that HTTPS is already server by another proxy, Zoraxy in our case. + +Now your site can look like this: + +![wp1](https://github.com/tobychui/zoraxy/assets/110860055/09900779-0845-4c00-8fe7-5451f7775176) +Adminpanel + + +We need to edit the wp-config.php file as root user. +Switch to root user: + +`sudo su` + +The file is located at the Wordpress-webroot (/var/www/html/wordpress). + +`cd /var/www/html/wordpress` + +Sidenote: + +If you use Wordpress in Docker and you used the standard docker-compose example the file should located at /var/lib/docker/volumes/wordpress_wordpress/_data/wp-config.php + +Open the wp-config.php with editor as root + +`nano wp-config.php` + +Put in these lines after the "