<p>Just want to chime in with what fixed this for me. </p>

<p>I had the same issue and it was the Nginx configuration. Specifically, the order that I some of my location and cache settings. </p>

<p>To get it working, I strictly followed the order from this: <a href="https://nystudio107.com/blog/static-caching-with-craft-cms" rel="nofollow noreferrer">https://nystudio107.com/blog/static-caching-with-craft-cms</a></p>

CC BY-SA 3.0
2017-09-09T03:33:46.770Z
2017-09-09T03:33:46.770Z
nathananderson
<p>Sorry for answering my own question.  </p>

<p>Upon a suggestion from P&amp;T, we found that our Nginx configuration was removing the cookies when it cached the page. When we left the cookies in, we were able to log in.</p>

<p>We still don't know what changed to make the site suddenly not work, but at least the control panel is usable.</p>

CC BY-SA 3.0
2017-01-20T02:09:08.203Z
Glad you got it sorted!
Brad Bell
CC BY-SA 3.0
2017-08-28T22:29:33.183Z
What was the actual solution to this? I'm running into the same thing.
hisnameisjimmy
CC BY-SA 3.0
2017-09-11T11:36:43.527Z
The actual solution was to remove the nginx lines that removed the cookies.
user6137
CC BY-SA 3.0
2017-01-18T20:04:44.330Z
2017-01-18T20:04:44.330Z
user6137
<p>I have an existing CMS website that seemingly has been working fine for several months.  Just recently we have lost the ability to access the admin portion of the site (the rest of the site works well).  To our knowledge, nothing has changed to make the site behave differently.</p>

<p>We have since set up our own dev box with identical code and it seems to behave the same way.  Works one day, next day we can't log in.  No errors in browser or log files.  Browser cache and cookies cleared.  Different browsers all work the same way.  You log in, it blinks a second, then redirects to login.  If wrong password entered, we get the wrong password error.  Even the database seems to show our login was good.</p>

<p>We have multiple environments on the original site, only the production environment has this issue.  Our second environment only has the production environment so i don't think they are conflicting.</p>

<p>Only thing i can think of is nginx cache but we don't cache the admin directories.  I don't see anything different in .htaccess that would do this.</p>

<p>Any ideas?</p>

CC BY-SA 3.0
2017-01-16T13:44:22.573Z
Our current theory is that we somehow voided Crafts licensing and they are not letting us use the control panel.  We are not sure the best way to contact them on this issue.
user6137
CC BY-SA 3.0
2017-01-16T22:20:31.230Z
Pretty strange. Try trashing the entire contents of your `/craft/storage` folder, see if that helps.
Lindsey D
CC BY-SA 3.0
2017-09-09T12:27:25.503Z
Just to firmly debunk your theory for future readers, @rscott6666 – Craft will *not* lock you out of your control panel if your license is invalid, it'll simply display an annoying alert.
Mats Mikkel Rummelhoff
<login>
CMS login redirects to back to login
# CMS login redirects to back to login

(Asked by: username_0 on 2017-01-15)

I have an existing CMS website that seemingly has been working fine for several months. Just recently we have lost the ability to access the admin portion of the site (the rest of the site works well). To our knowledge, nothing has changed to make the site behave differently.

We have since set up our own dev box with identical code and it seems to behave the same way. Works one day, next day we can't log in. No errors in browser or log files. Browser cache and cookies cleared. Different browsers all work the same way. You log in, it blinks a second, then redirects to login. If wrong password entered, we get the wrong password error. Even the database seems to show our login was good.

We have multiple environments on the original site, only the production environment has this issue. Our second environment only has the production environment so i don't think they are conflicting.

Only thing i can think of is nginx cache but we don't cache the admin directories. I don't see anything different in .htaccess that would do this.

Any ideas?

**Tags:** login

> **Comments:**
> **username_0**: Our current theory is that we somehow voided Crafts licensing and they are not letting us use the control panel.  We are not sure the best way to contact them on this issue.  
> **username_1**: Pretty strange. Try trashing the entire contents of your `/craft/storage` folder, see if that helps.  
> **username_2**: Just to firmly debunk your theory for future readers, @rscott6666 – Craft will *not* lock you out of your control panel if your license is invalid, it'll simply display an annoying alert.  

---

## 2 answers

### Answer by username_3 on 2017-09-09. Score: 2

Just want to chime in with what fixed this for me.

I had the same issue and it was the Nginx configuration. Specifically, the order that I some of my location and cache settings.

To get it working, I strictly followed the order from this: <https://nystudio107.com/blog/static-caching-with-craft-cms>


---

### Answer by username_0 on 2017-01-18. Score: 2

Sorry for answering my own question.

Upon a suggestion from P&T, we found that our Nginx configuration was removing the cookies when it cached the page. When we left the cookies in, we were able to log in.

We still don't know what changed to make the site suddenly not work, but at least the control panel is usable.

> **Comments:**
> **username_4**: Glad you got it sorted!  
> **username_5**: What was the actual solution to this? I'm running into the same thing.  
> **username_0**: The actual solution was to remove the nginx lines that removed the cookies.  

---

