I'm using Drupal with CloudFront CND. Drupal works very well without CloudFront, but I get an error when I try to login in my website after enable CloudFront, the user is ok, the pass is ok but I get 'Access Denied".

This happen always when I enable CloudFront. Also, If I change my host file and I set my server's ip pointing to my address I can get access.

I was thinking that it could be a problem with CloudFront and I check if my CloudFront allow POST method (it allows all). After that I check the CDN options and I think that maybe I can set some type of whitlist to avoid to get my website from CloudFront, for expample, if I go to the url "www.mywebsite.com/login", it would be served from the server and not from CloudFront.

I check if I can do it added to this option: DRUPAL PATH FOR AUTHENTICATED USERS, but it doesnt works adding "admin*" or "user*", I use /user to login and admin the website.

Someone can help me?

  • If I change my host file and I set my server's ip pointing to my address I can get access. so your problem is that DNS hasn't propagated yet, right? Nothing Drupal can do to help you with that, no. You have to wait like we all do for such things
    – Clive
    Aug 29, 2016 at 12:30
  • I have a week with this problem... I'm starting to think that maybe could be a cookie problem, but I don't find where it is. Aug 29, 2016 at 13:05
  • If it works when you provide a static DNS record, then the problem is likely to be DNS further up the chain. Try setting you DNS to google's to at least eliminate
    – Clive
    Aug 29, 2016 at 13:16
  • I was checking today, I'm pretty sure that is a problem of a cookie domain. I mean, I have 2 domains, cloudfront.net and midomain.com. I would like to disable the cookie_domain or something like that but I think I cant do that. Aug 30, 2016 at 8:39
  • If you're serving content from 2 different hosts then yeah, that'd do it. 2 different domains can't share the same cookie, It's a security feature that all major browsers adhere to strictly (for good reason)
    – Clive
    Aug 30, 2016 at 8:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.