Image References Broken when IP Changes Temporarily

(Keith Guerrette) #1

I’m actually just looking for some good ideas on this -

I’m about to launch a new community, and so I’ve recently put up a splash page and have used one of Digital Ocean’s floating IPs to connect to the splash page. This means that my discourse install is only accessible through it’s own server’s IP. This is fine, except the path to all of the images and uploaded content is still referencing my full domain, so all of these are temporarily broken until I reconnect the path.

This isn’t a problem until I try to work on imagery on the site while the splash page is up (in the future it’ll be a maintenance splash page). I’ve found some great references on here for how to bulk-correct the image content, but in this case, I’m curious if there’s a way to set these to a local path, or IP that will work in all scenarios? Is that naive?


(Jeff Atwood) #2

If you are the only person testing, edit your hosts file on your computer so there is a URL you can use to access the site. In general domain names are so cheap and easy to get, that it just doesn’t make sense to run as an IP address for any reason other than local development.