Answer the question
In order to leave comments, you need to log in
How to solve Wordpress https issue on nginx + apache hosting?
I installed wordpress on http hosting in nginx, it is forcibly redirected to https, but links in http still remain, js, css, img, etc. are not loaded. where can I replace http with https in the engine itself?
And if I put in the WordPress Address (URL): https:// then the admin panel does not open in general, although in wp-config.php I registered the SSL permission for the admin panel define( 'FORCE_SSL_ADMIN', true );
Answer the question
In order to leave comments, you need to log in
I have this:
one docker container with wordpress and apache
the second docker container with nginx
1) in the WP settings I change the site address from https
2) dump the database, change all links to https, upload the dump back
3) add wp-config define('FORCE_SSL_ADMIN', true);
4) to wp-config change
// If we're behind a proxy server and using HTTPS, we need to alert Wordpress of that fact
// see also http://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy
//if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
//}
The problem is that the HTTPS request is received by Nginx and then forwarded to Apache via HTTP. Your CMS receives a regular HTTP request and generates regular links.
Logs, configs, Apache, Nginx.
In WP, the address is set in two constants
WP_HOME and WP_SITEURL
In articles, links can be quickly replaced using WP-cli or https://github.com/interconnectit/Search-Replace-DB
З.Ы. Why do you need Apache in this bunch?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question