mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-01 13:17:21 +02:00
Destroyed Fixing Wordpress "Mixed content" or "CSP header" errors (markdown)
parent
c94883fb1f
commit
b94eb6f8d2
@ -1,50 +0,0 @@
|
||||
You already have a running Wordpress site with HTTPS and now it looks messed up since you use Zoraxy?
|
||||
Then here is a solution for you!
|
||||
|
||||
Now your site looks like this with Zoraxy:
|
||||
|
||||

|
||||
Adminpanel
|
||||
|
||||
|
||||
Let´s fix this! We need to edit the wp-config.php file as root user.
|
||||
Switch to root:
|
||||
|
||||
`sudo su`
|
||||
|
||||
The file is located at the Wordpressweb root (/var/www/html/wordpress).
|
||||
|
||||
`cd /var/www/html/wordpress`
|
||||
|
||||
Sidenote:
|
||||
|
||||
If you use Wordpress in Docker and you used the standard example the file should located at /var/lib/docker/volumes/wordpress_wordpress/_data/wp-config.php
|
||||
|
||||
Open the wp-config.php with nano editor
|
||||
|
||||
`nano wp-config.php`
|
||||
|
||||
Put in these lines after the "<?php" part of the file
|
||||
|
||||
`if ( (!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) { $_SERVER['HTTPS'] = 'on'; }`
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
That´s it!
|
||||
|
||||
Save the file with **CTRL + O** and leave nano with **CTRL + X**
|
||||
|
||||
Reload your page!
|
||||
|
||||

|
||||
Adminpanel
|
||||
|
||||
Leave the root shell with
|
||||
|
||||
`exit`
|
||||
|
||||
You are done :)
|
||||
|
||||
Tested with Wordpress and Apache on a hostinstallation and Wordpress in Docker (wordpress:latest) with existing sites.
|
Loading…
x
Reference in New Issue
Block a user