On login I'm being redirected back to the login page with no errors
Asked by Nathan Wailes:

**Background**

I bought a Confluence Server license a few days ago and I'm trying to get it set up. I've got it working at <http://www.rhymecraft.guru/wiki>.

**The problem**

Logging in stopped working. Logging in *was* working before, so I don't understand what has changed.

Here's an animation of what it looks like: <https://imgur.com/a/iUhKXd2>

**What I have tried**

* I've tried using an incognito window.
* I've tried clearing my browser's cache. (I'm using Chrome)
* I've tried using other browsers (Firefox and IE).
* I've tried accessing the wiki via the server's direct IP (so, <http://XXX.XXX.XX/wiki>)
* I've tried looking at /opt/atlassian/confluence/logs/catalina.out and I didn't see anything of note (just some warnings about connecting to MySQL without SSL or something).
* I've tried resetting the password, but Confluence gives me an error about email not being set up, so I can't reset my password.
* I've tried checking the atlassian-confluence.log file for errors; I didn't see any.

**Related documentation**

* [Redirected to the login screen with no errors when attempting to log in to any Atlassian applications](https://confluence.atlassian.com/crowdkb/redirected-to-the-login-screen-with-no-errors-when-attempting-to-log-in-to-any-atlassian-applications-376834420.html)
  * This documentation is for Atlassian Crowd.
  * I don't know how to tell if I'm using Single Sign-On (SSO) or not.
* [Restore Passwords To Recover Admin User Rights](https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html)
  * I'm not getting an 'invalid username / password' error, so it seems like my password is correct and I don't really need to recover it. I'll try these steps at some point and report what happens.
* [Can't check base URL warning in Confluence 6.6 or later](https://confluence.atlassian.com/confkb/can-t-check-base-url-warning-in-confluence-6-6-or-later-939718433.html)
  * I was getting this error when I was logged into Confluence, but I don't know if that would cause the login page to stop working. It seems that it was just being caused by my accessing the wiki via the server's IP (i.e. <http://XXX.XX.XX/wiki>) rather than via the domain name.

**What I think might be happening**

* I haven't yet set up HTTPS, so part of me suspects that that *might* be part of it, but that doesn't explain why it was working before.
* The last thing I did was to get the wiki to work at the /wiki subpage and at the [www.rhymecraft.guru](http://www.rhymecraft.guru) domain, so maybe something I did in connection with that caused login to stop working?

**Server files**

* [server.xml](https://gist.github.com/NathanWailes/5f47ae8a4cf326c4696771e736d8a7b2)
* [rhymecraft.conf](https://gist.github.com/NathanWailes/eb26ff1119b704c5eb5d3be36967aebf)
* [atlassian-confluence.log](https://gist.github.com/NathanWailes/a72f0e4cda16b5a556ae34d7f8c2ebae)


Answers:
author: Nathan Wailes
body: Ok the guy I hired on Upwork got it working. I unfortunately didn't get to see him at work the entire time, but from what he told me, it seems like this may have been a situation where a single setting was not correct. In this case it seems like the setting that was not correct was neither in server.xml nor in rhymecraft.conf, but rather in Cloudflare. I needed to have SSL set to "Full (strict)", and it seems I may also have needed to have "Always Use HTTPS" to "On". IIRC I had turned both of those off while trying to get the wiki working with http and I didn't think that having them off would prevent HTTPS from working, and I *especially* didn't suspect that it would be causing the login-page redirect I was seeing.

Below are the files / settings as they exist now, with everything working (SSL, Confluence, my blog, etc.):

* [server.xml](https://gist.github.com/NathanWailes/849ed56d150c462bb8089ebfe07db402)
* [rhymecraft.conf](https://gist.github.com/NathanWailes/32621a6bd599afdacaed1521a2d2ef7c)
* Cloudflare settings:
  * SSL: Full (strict)
  * Always Use HTTPS: On
  * Automatic HTTPS Rewrites: Off


author: Alexey Matveev
body: Hello,

Have a look at the atlassian-confluence.log file for errors. You can find more info here:

<https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html>

comments: author: Nathan Wailes
body: Hi Alexey, thank you for your help! I don't see any errors. Here's what I see at the bottom of the log, the only change was to remove my IP:

* [atlassian-confluence.log](https://gist.github.com/NathanWailes/a72f0e4cda16b5a556ae34d7f8c2ebae)


author: Alexey Matveev
body: Are you sure that you do not have any plugins, which influence the user log in?


author: Nathan Wailes
body: How would I check that?


author: EL Motasim Gumaa
body: Hi,   
For example, you can rest the server.xml \<connector\>\</connector\> or add another http connector so you can access through localhost:8080 to Confluence. Then go to Admisitration\>\>Manage apps\>\> User-installed

Check if you have any apps that are used for SSO for and what settings do they have

![confluence.png](https://community.atlassian.com/t5/image/serverpage/image-id/42451iB84BC879F3DDC081/image-size/large?v=v2&px=999 "confluence.png")


author: Alexandru Luchian Constantinescu
body: Hi! Did you solve the issue?

If you only just installed Atlassian Confluence (i understand you are just getting started), for sure you don't use SSO/Crowd. That's another application you would install on your server and configure.

I would suggest to align your configuration and don't be afraid to add https, since i see you already have a certificate:

- the proxyScheme in server.xml should be https

- the proxyPort = 443

- import the certificate you mention in your apache config into the java keystore. Make sure you use the java executable bundled in your Confluence installation. You can find exactly the path of the JDK being used in your confluence log during startup. It is something like {code}

    keytool -importcert -file certificate.cer -keystore keystore.jks -alias "Alias"

- move the Confluence related config (ProxyPass, ProxyPassReverse etc) from port 80 virtualHost to the 443 virtualHost in your apache config.

- remove from server.xml this: redirectPort="8443"

Feel free to come back to me if it still doesn't work.


author: Nathan Wailes
body: Hi [@EL Motasim Gumaa](/t5/user/viewprofilepage/user-id/48120), thank you for your help! I just checked and these are the only user-installed apps I have:

* Atlassian Troubleshooting and Support Tools

* Atlassian Universal Plugin Manager Plugin

* Cloud Migration Assistant for Confluence

* (Image: <https://i.imgur.com/wP1QQws.png>)


author: EL Motasim Gumaa
body: Hi [@Nathan Wailes](/t5/user/viewprofilepage/user-id/968110)

Then it's only a configuration(server.xml \& apache conf) problem. So, you will have to import the certificate to the keystore and use port 443 in your Apache config as [@Alexandru Luchian Constantinescu](/t5/user/viewprofilepage/user-id/1171305) described.


author: Nathan Wailes
body: I'm paying someone I found on Upwork to get this all working for me, I'll add a comment to this thread explaining the changes he ends up needing to make.


author: Alexandru Luchian Constantinescu
body: Let us know how it goes :)

I saw your upwork post but moved too slow to apply. Figured i'll just answer here for free then


author: Nathan Wailes
body: I just posted it as a separate answer. It seems it was being caused by my turning off SSL in Cloudflare. I don't really understand how that would happen, but whatever, it's working now.


author: EL Motasim Gumaa
body: Good to know that! :)


Tags: confluence-server

server