Localhost URL’s not picked up from env variable


#1

I’m using ghost 2.2.4

I’ve tried to follow documentation closely, but must have gone wrong somewhere.

I set the environment variable ‘URL’ to match my site URL, but all the auto generated links still point to localhost:port. I think I’m setting the correct env variable, but perhaps I’m missing some secret sauce? The site is https://planesailinggames.com - if you look at the auto generated links you’ll see what I mean.


#2

@AlexWhite it would be useful if you shared how you are setting the ENV variable when starting Ghost


#3

Hi Kevin, I’m using a Linux App Service on Microsoft Azure to host the standard 2.2.4-alpine docker container.

Within the Azure Portal I set the environment variables as “Application Settings” for the container, which should set it as the environment variable.

I’ve just been able to see the env settings as the container sees them (I’m now on a desktop rather than a phone) and I can see

URL = https://planesailinggames.com

#4

You need to use lowercase, the same as the config variable:


#5

Brilliant, thank you. I must be so used to seeing environment variables in upper case that I had ‘case blindness’ here. Setting the key to lower case ‘url’ resolved my problem.


#6

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