Ghost site loads locally but assets 404 in production
0 reputation · 01 Jan 2023, 00:03 UTC
The Ghost publishing platform builds absolute URLs for stylesheets, scripts, images and feeds from the `url` value in its configuration. When the same configuration works on a developer’s machine but the live site shows broken styling and missing images, the symptom is that browsers request those resources from an address that does not match the public domain.
The discrepancy usually originates because the `url` setting still points to `localhost` or an internal address that is reachable only in the local environment. It is unclear whether the production instance is reading the value from the configuration file, an environment variable, or a overridden default, and whether Ghost’s internal validation would have flagged the mismatch before deployment. Which configuration source determines the effective `url` in production? Does the deployed setting include the correct protocol and omit unnecessary port numbers? Would Ghost’s internal validation flag a URL mismatch for the live environment?