• My configuration:

    LInux Ubuntu Server 18.04 LTS amd64
    apache2 2.4.29-1ubuntu4.11
    mysql-server 5.7.29-0ubuntu0.18.04.1
    php 7.2+60ubuntu1
    php7.2-common 7.2.24-0ubuntu0.18.04.2

    wordpress 5.3.2–hr

    Server almost default install, WP default install, wp-config.phph basic.

    Set apache configuration of virtual host for http and https.

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName kviz.sfsb.hr
    DocumentRoot /var/www/kviz
    <Directory /var/www/kviz>
    Options -Indexes
    </Directory>
    </VirtualHost>

    <VirtualHost *:443>
    ServerName https://kviz.sfsb.hr
    DocumentRoot /var/www/kviz
    <Directory /var/www/kviz>
    Options -Indexes
    </Directory>
    </VirtualHost>

    .htaccess file empty

    Right after installation when I access WP by https – https://test.domain.com I get frontend (default 2020 theme applied), login and admin area totally messed up, like no CSS exists.

    I tried this solution for admin area:

    define(‘FORCE_SSL_ADMIN’, true);
    // in some setups HTTP_X_FORWARDED_PROTO might contain
    // a comma-separated list e.g. http,https
    // so check for https existence
    if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
    $_SERVER[‘HTTPS’]=’on’;

    but results are same – seems there is no CSS.

    When I add lines:

    define( ‘WP_HOME’, ‘https://kviz.sfsb.hr&#8217; );
    define( ‘WP_SITEURL’, ‘https://kviz.sfsb.hr&#8217; );

    to wp-config.php I get error message:

    The page isn’t redirecting properly

    I searched many sites and tried many solutions but I’m stuck now.
    I would like to get working at least admin and login areas.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is because mixed content is being displayed on your kviz.sfsb.hr website.

    It means you are loading files over HTTP within the page that is HTTPS.
    Please make sure things like images, CSS and JavaScript files are being loaded specifically over HTTPS.

    You can fix this if you install and use the HTTPS (SSL) plugin or Really Simple SSL WordPress plugin.

    Thread Starter mmazurek

    (@mmazurek)

    Thx for reply, but there is no images, no content, nothing but fresh wordpress install. Tried with that plugins but nothing helped. Only thing that plugins changed are site and home url (https instead of http) so i cant open admin or login area any more because of irregular redirecting. Where that redirecting come from I also very much wander.
    Either is my fresh installation of ubuntu, apache2 and php 7.2 very wrong or either is something broken in wordpress.

    Thread Starter mmazurek

    (@mmazurek)

    Just one additional thing.

    Looking at page https://kviz.sfsb.hr/wp.login.php could anybody tell me what exactly to change in WP to make that page display correctly over https?

    Thread Starter mmazurek

    (@mmazurek)

    Just one additional thing.

    Looking at page https://kviz.sfsb.hr/wp-login.php could anybody tell me what exactly to change in WP to make that page display correctly over https?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress over https on apache and ubuntu not working on vanilla setup’ is closed to new replies.