skip to Main Content

My question is very simple, I think, but very common. For days, I was searching the solution but find nothing at all.

I’m trying to install WordPress directly in HTTPS on this URL: https://viktora.org
As you can see the CSS styles is gone and not working properly. I’m using Apache with NGINX proxy server on my Debian 9 OS.

I tried all the solution like setting the .htaccess file, adding: define(‘WP_HOME’,’https://viktora.org‘);
define(‘WP_SITEURL’,’https://viktora.org‘);
in wp_config.php file but it didn’t help me.

Please, help me with the right solution. Thank you very much in advance.

2

Answers


  1. You need to change the site url in admin dashboard too in advance of the above mentioned one. Upon opening the url “https://viktora.org“, it seems that you need add DBname, username and password

    Login or Signup to reply.
  2. You need to tell WordPress that it’s behind a proxy otherwise it may not actually rewrite the locations correctly. Adding a check to your wp-config.php file like this may fix this for you.

    // 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';
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search