Replies: 1 comment 2 replies
-
I tried to modify the 'siteurl' and 'home' fields in the table 'options' in mysql to 'https://domin.com', and found that the file url changed from 'https://ip:port' to 'http://domin.com', but the problem was still not resolved |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
version: docker wordpress:latest
wp-config.php:
define('WP_HOME','https://domin.com');
define('WP_SITEURL','https://domin.com');
define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
$_SERVER['HTTPS'] = '1';
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {

$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
nginx.config:
server {
listen 80;
server_name www.domin.com domin.com;
location / {
proxy_pass http://ip:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
question:
Only these static file urls are https://ip:port instead of https://domin.com, the website can be accessed but the style is disordered
Beta Was this translation helpful? Give feedback.
All reactions