SSL works if manually inserted in browser but not via Local Interface

What issue or error are you experiencing?

Given that manually typing the HTTPS URL into any of my browsers works fine and properly loads the HTTPS version of my site, but Local’s “View Site” button does not automatically use HTTPS, the issue seems to be specifically with how Local is handling the URL redirection or URL generation from its interface. Can you provide me steps to potentially resolve or work around this issue?

System Details

Win 11 on Laptop / Used both Chrome and Edge

  • Local Version:
    Version 9.0.1+6673

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

“class”:“Process”,“level”:“warn”,“message”:“2024-04-22T22:12:57.165107Z 0 [System] [MY-010931] [Server] %%userDataPath%%\lightning-services\mysql-8.0.16+6\bin\win64\bin\mysqld.exe: ready for connections. Version: ‘8.0.16’ socket: ‘’ port: 10005 MySQL Community Server - GPL.”,“process”:“mysql”,“thread”:“main”,“timestamp”:“2024-04-22T22:12:57.166Z”}
{“level”:“debug”,“message”:“Database responded to ping.”,“service”:{},“serviceBinVersion”:{},“thread”:“main”,“timestamp”:“2024-04-22T22:12:57.414Z”}
{“class”:“WordPressInstaller”,“level”:“info”,“message”:“"WP_ENVIRONMENT_TYPE" already set to "local"”,“thread”:“main”,“timestamp”:“2024-04-22T22:13:04.528Z”}
{“class”:“RouterService”,“level”:“debug”,“message”:“Running proxyManager::add”,“thread”:“main”,“timestamp”:“2024-04-22T22:13:04.709Z”}
{“class”:“X509CertService”,“level”:“debug”,“message”:“earthgods.local.key already exists. Skipping certificate creation.”,“thread”:“main”,“timestamp”:“2024-04-22T22:13:04.711Z”}
{“class”:“Process”,“level”:“verbose”,“message”:“Spawned”,“pid”:15300,“process”:“nginx”,“thread”:“main”,“timestamp”:“2024-04-22T22:13:04.761Z”}
{“level”:“debug”,“message”:“Database responded to ping.”,“service”:{},“serviceBinVersion”:{},“thread”:“main”,“timestamp”:“2024-04-22T22:13:04.893Z”}

error – last error was several hours ago – before I deleted cert and went through reboot of machine and restart of local – so last error reported isn’t applicable but here it is anyway:

2024/04/22 11:22:04 [error] 10748#14376: *3 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: ::1, server: earthgods.local, request: “POST /wp-admin/admin-ajax.php HTTP/2.0”, upstream: “http://127.0.0.1:10004/wp-admin/admin-ajax.php”, host: “earthgods.local”, referrer: “https://earthgods.local/wp-admin/options-general.php


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @NWSunni

Have you been through our help article here?

I’m a voracious reader, so yes, yes, yes. I ended up having to create a new Local site and porting files over. That worked fine for a while. Now, I’m already experiencing WP Admin click-throughs going to http rather than https. So, I’m just adding the “s” manually and it works fine, including the auto login. Checked MySQL and all is good there. Double-checked settings. All good there. Did a hard clear of the cache. Kind of a PIA but there are bigger problems in life than this. It is strange, though. I could go back to wamp but this isn’t enough to drive me there. Thanks for the reply. If you have ideas, I’m interested as it is a curiosity to me.

1 Like

Hi there @NWSunni -

Glad you found a solution that works for you.

That said, we do have a bug in our backlog related to this issue.

Thank you!

Sam

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.