<p>I have a weird issue happening and looking for any advice or tricks to try.  I currently have an AWS setup for my site but I don't have control of aws as that is handled by a different internal department so I can't change much with those settings.</p>
<p>The issue is randomly our admin control panel will start to request all http files rather then https files and we get a non secure message and those files don't load so therefore the admins can't login.  The way to fix it I have found is to accept insecure content and then I can login go to clear cache in the settings and then things work again for a period of time.  It could work for an hour or 10+ days and then out of no where the same thing happens again.  I have gone through all of my configs and everything such as baseurl is set to https.  There is no reference to http so I am not sure what is happening.  I have not been able to find anyone with a similar issue. My best guess is it could be something with out AWS setup but I am just guessing but our AWS team says the setup is correct and we have plenty of other sites with similar setup and they do not experience any similar issues.</p>
<p>I have narrowed it down to if I select only the data cache it will resolve the issue rather then clearing all caches.  The one potential band aid fix I have thought of would be to create a cron that would run that process either daily or even hourly.  I would not be sure how to do that since it seems you must be logged in as admin to run it but guessing a custom plugin may be able to create a way to do it.</p>
<p>If you have any tips on creating that plugin such as how to get around needed to be logged in or any other ideas on what may be going on I would appreciate it since I am running low on options.</p>
<p>Thanks in advance and this is a craft 2 latest version site.</p>

CC BY-SA 4.0
2022-03-17T20:28:03.677Z
When you say your "baseurl is set to https", do you mean the `siteUrl` config setting (alternatively, the "Site URL" setting inside the control panel, if you're not overriding in config)? Have you tried explicitly declaring the [`baseCpUrl`](https://craftcms.com/docs/2.x/config-settings.html#basecpurl) config setting? You shouldn't need to in normal circumstances, but...
Mats Mikkel Rummelhoff
CC BY-SA 4.0
2022-03-21T14:28:49.943Z
It is siteUrl and I also have baseCpUrl set to https as well.
user1535268
<php><craft2><ssl>
Admin CP requests Http rather than https so browser gives non secure and javascript doesn't load
# Admin CP requests Http rather than https so browser gives non secure and javascript doesn't load

(Asked by: username_0 on 2022-03-17)

I have a weird issue happening and looking for any advice or tricks to try. I currently have an AWS setup for my site but I don't have control of aws as that is handled by a different internal department so I can't change much with those settings.

The issue is randomly our admin control panel will start to request all http files rather then https files and we get a non secure message and those files don't load so therefore the admins can't login. The way to fix it I have found is to accept insecure content and then I can login go to clear cache in the settings and then things work again for a period of time. It could work for an hour or 10+ days and then out of no where the same thing happens again. I have gone through all of my configs and everything such as baseurl is set to https. There is no reference to http so I am not sure what is happening. I have not been able to find anyone with a similar issue. My best guess is it could be something with out AWS setup but I am just guessing but our AWS team says the setup is correct and we have plenty of other sites with similar setup and they do not experience any similar issues.

I have narrowed it down to if I select only the data cache it will resolve the issue rather then clearing all caches. The one potential band aid fix I have thought of would be to create a cron that would run that process either daily or even hourly. I would not be sure how to do that since it seems you must be logged in as admin to run it but guessing a custom plugin may be able to create a way to do it.

If you have any tips on creating that plugin such as how to get around needed to be logged in or any other ideas on what may be going on I would appreciate it since I am running low on options.

Thanks in advance and this is a craft 2 latest version site.

**Tags:** php, craft2, ssl

> **Comments:**
> **username_1**: When you say your "baseurl is set to https", do you mean the `siteUrl` config setting (alternatively, the "Site URL" setting inside the control panel, if you're not overriding in config)? Have you tried explicitly declaring the [`baseCpUrl`](https://craftcms.com/docs/2.x/config-settings.html#basecpurl) config setting? You shouldn't need to in normal circumstances, but...  
> **username_0**: It is siteUrl and I also have baseCpUrl set to https as well.  

---

## 0 answers

