SSL and redirect issues with wordpress wp-admin page

  • Posted on December 23, 2014
  • kolemcraeAsked by kolemcrae

So I signed up with cloudflare and got the universal ssl which is great. I let it propogate overnight.

This morning I checked and the ssl version of my site worked somewhat but had some minor issues. I tried a few plugins and found one that fixed the issues.

I then switched wordpress to make the homepage default to the ssl.

The site worked fine.

The wp-admin had an infinite redirect loop. No idea why.

I tried turning off plugins, to no avail.

I tried changing the site back to non https via wp-config. This makes the regular site now load without the https, so thats fine, but wp-admin still doesn’t load.

Any thoughts?

The site is ssl is

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi #DOers

Although it is 3yrs down-hill, yet answering the question might help someone in need henceforth.

I will explain about how to do it on Ubuntu. It will be the same for other Linux distros but just sudo would become yum in case of CentOS and so on, so forth!

So here goes: “remove endless redirect loop on apache web server” :

Redirect loops are created when you have a proxy in front of your server. In the subject case, we have an Apache server (tested on this day while replying).

Now @kolemcrae seems to have removed #CloudFlare from the picture to achieve HTTPS but here is a quick link to small “magic mod” for Apache Web Server.

A simple guide is given below to download, compile & install the mod from source:

First, install dependencies:

sudo apt-get install unzip build-essential apache2-threaded-dev libtool libtool-bin

For Ubuntu 16.04 and above apache2-threaded-dev is now available on apache2-dev. So replace as your case maybe! Moving on…

Next, download the ZIP archive from GIT from below link:


It is preferable that you download this ZIP archive in /tmp folder but it is your choice if you like to clean up manually afterwards. Moving on…

Next, unzip the archive and change to extracted directory i.e. mod_rpaf-stable:

cd mod_rpaf-stable```

Once inside the directory, it's time to compile & install the archive:

```sudo make

sudo make install```

Now, there is an important prompt when "make install" completes. Please follow that with *libtool*. For this *libtool* command to work, you need 'libtool-bin' which we have already installed.

Next, let us setup the mod manually as follows:

```sudo nano /etc/apache2/mods-available/rpaf.load```

The above command will create and open a new file. Copy & Paste following line in this new file:

```LoadModule rpaf_module /usr/lib/apache2/modules/```

Next, create an Apache mod in mods-available directory:

```sudo nano /etc/apache2/mods-available/rpaf.conf```

The above command will create & open a new file for editing. Copy & paste following lines in it:

```<IfModule mod_rpaf.c>
        RPAF_Enable             On
        RPAF_Header             X-Real-Ip
        RPAF_SetHostName        On
        RPAF_SetHTTPS           On
        RPAF_SetPort            On

Finally, enable this newly created mod and restart Apache Web Server:

```sudo a2enmod rpaf

sudo service apache2 restart```

That's it !!

Reference: This [Article]( STEP-8
Credits: @jesin