Title: WordPress over https on apache and ubuntu not working on vanilla setup
Last modified: February 6, 2020

---

# WordPress over https on apache and ubuntu not working on vanilla setup

 *  [mmazurek](https://wordpress.org/support/users/mmazurek/)
 * (@mmazurek)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup/)
 * 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](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](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](https://kviz.sfsb.hr&#8217););
   
   define( ‘WP_SITEURL’, ‘[https://kviz.sfsb.hr&#8217](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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [RoseHosting](https://wordpress.org/support/users/rosehosting/)
 * (@rosehosting)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup/#post-12406846)
 * 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](https://wordpress.org/support/users/mmazurek/)
 * (@mmazurek)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup/#post-12407503)
 * 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](https://wordpress.org/support/users/mmazurek/)
 * (@mmazurek)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup/#post-12408744)
 * Just one additional thing.
 * Looking at page [https://kviz.sfsb.hr/wp.login.php](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](https://wordpress.org/support/users/mmazurek/)
 * (@mmazurek)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup/#post-12409037)
 * Just one additional thing.
 * Looking at page [https://kviz.sfsb.hr/wp-login.php](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.

## Tags

 * [apache](https://wordpress.org/support/topic-tag/apache/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [ubuntu](https://wordpress.org/support/topic-tag/ubuntu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [mmazurek](https://wordpress.org/support/users/mmazurek/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/wordpress-over-https-on-apache-and-ubuntu-not-working-on-vanilla-setup/#post-12409037)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
