Community

how to setup dev site for SSL live site

I have a live site that has an SSL cert.

I have moved this site's codebase and DB to my local dev environment, but I cannot get it to work. I changed the settings.php file accordingly, but when I try to visit
localhost:8888
it wants to forward to
https://mywebsiteurl.com/user

I even tried changing the line in settings.php to
$base_url = 'http://localhost:8888';

Comments

check .htaccess may be

check .htaccess
may be rewrite rules are there

not the .htaccess

I really think this is a problem related to stored SSL settings from the live site. I notice that the local url changes to:
httpS://localhost:8888

I put a fresh .htaccess file in the root just to test, and I still get this problem.

Is it storing some SSL setting in the database?

If you have SSL enabled on

If you have SSL enabled on your live site then it's likely you are using a module like Secure Pages or Secure Login to force SSL mode.
If you want to work non-secure on your development site you'll need to find/disable that module first, take your backup, then turn it on. Go to the modules list and see if one of those or a similar module is enabled. Some have settings so you can adjust when/how it switches.

Alternatively, why don't you generate a self-signed cert for your dev site and enable ssl locally? It's generally simple do this (exact method depends upon what you are using as your local server).

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.

That's it!

Aha! Thank you...this must be it!
(I didn't develop the site, I inherited it. But I do know it uses both Secure Login and Secure Pages.)

I can learn how to setup a self-signed cert locally (I use MAMP) but it still doesn't help me with the remote dev server. This client has enormous red tape to process domains and SSL certs, and all they granted me was a non-secure dev url. If I disable the Secure Login/Pages modules on the live site (just to export the DB), it will temporarily not be "safe." How would I prep the live site to export the DB to the dev?

Thinking, before disabling on

Thinking, before disabling on the live site, if you can access your dev db directly you can try disabling the modules via the database - go to the systems table and search for the modules. There is a column 'enabled' (I believe) - change the 1 to a 0. Hopefully that'll do it. There is a chance there's some bootstrap caching happening if you get white-screens. If that happens you can try taking a new db backup with caching off, or clear (truncate) the cache_* tables manually.

Oh, and if you have a polite way to do so, let them know having an unsecure dev version of the site is risking the data they obviously wanted to protect. It's a small risk as I assume they secure dev site access in some other way, but it is there. ..just something for them to think about. A self-signed cert is free to generate and unless they don't have SSL on that server or have a scarcity of IPs there's no real reason not to do it.

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.

Thank you Sara. This is

Thank you Sara. This is really helpful to me!

nobody click here