I am a complete noob to Ghost and web development/terminal.
I have set up my own Ghost blog using the one-click installation on Digital Ocean. I have created a CNAME record for my domain so I can use www. for my domain and see that I require a SSL cert for that also.
# Edit the nginx config files for your second domain to redirect to your canonical domain. In both files replace the content of the first location block with:
return 301 https://my-canonical-domain.com$request_uri;
I do not understand what I have to do, when I put the above command in the terminal with my original domain e.g. website.com, the terminal responds with a:
-bash: return: too many arguments
error message.
How am I supposed to
Edit the nginx config files for your second domain to redirect to your canonical domain. In both files replace the content of the first location block with:
How do I access the ngix files and how do I edit/save them?
Hey, I am also totally new at this but I’ve been thrashing around in a few docs recently and recalled that one of them stated that this can be found in /etc/nginx/sites-available/ so cd to that
The files themselves will be something like the below, edit the ones you need to make the change on which is dependant on your config.