isaacadams

Ghost SSL

Oct 2nd, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # Determine your secondary URL
  2. ghost config url https://my-second-domain.com
  3.  
  4. # Get Ghost-CLI to generate an SSL setup for you:
  5. ghost setup nginx ssl
  6.  
  7. # Change your config back to your canonical domain
  8. ghost config url https://my-canonical-domain.com
  9.  
  10. #
  11. cd /etc/nginx/sites-enabled/
  12. nano www.isaac.io.conf
  13.  
  14. # 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:
  15. return 301 https://my-canonical-domain.com$request_uri;
  16.  
  17. # Get nginx to verify your config
  18. sudo nginx -t
  19.  
  20. # Reload nginx with your new config
  21. sudo nginx -s reload
Add Comment
Please, Sign In to add comment