Local Install Broken -- Localhost URLs redirecting

Ghost 3.1.1, Firfox, Debian, Liebling theme

I’ve been running Ghost locally at localhost:2368. Yesterday, while Ghost was running, I was trying to iron out some issues involving my production environment sometimes showing “localhost,” and I went into a few places, including config.development.json, and tried changing the localhost URL to my production URL. This was a bad idea. I see that now.

This morning, I went to localhost:2368/ghost, and it forwarded me to my production URL. I can’t have that. I stopped ghost, changed the URL in config.development.json back, and… it still forwards me to my production URL. In one or two places, it seems to forward to just “localhost,” without the port, wich I don’t understand, and does nothing. Sometimes – this seems to happen when I try going to localhost over https – I get “SSL_ERROR_RX_RECORD_TOO_LONG.”

Interestingly, it kind of works when I type in “http://127.0.0.1:2368/” except some pictures stop loading and http://127.0.0.1:2368/ghost/#/site seems to be trying to load localhost.

Please tell me I didn’t totally bork this thing…

Hey @DanHakimi :wave:

Did you try visiting the site in an incognito window? I have a feeling you might have been affected by cached redirects for a bit :thinking:

1 Like

Welp… I’m stupid. I guess I didn’t know redirects could get cached like that. Is there an easy way to clear that bit of the cache? A few photos still aren’t loading right, but I imagine those will resolve themselves in a minute.

Maybe restart your browser? I’m not sure if temporary caches are cleared, but it’s worth a shot :dizzy:

Naw, just cleared the last few hours the old fashioned way, all good now, thanks!