Skip to content

Instantly share code, notes, and snippets.

@ErisDS
Last active February 2, 2019 22:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErisDS/3b475f84a1163bbb7579021abfff1abe to your computer and use it in GitHub Desktop.
Save ErisDS/3b475f84a1163bbb7579021abfff1abe to your computer and use it in GitHub Desktop.
Recommended apache config for Ghost(Pro) subdirectory proxy. SSL is required.
# You'll need to enable the ssl, proxy and proxy_http modules:
# sudo a2enmod ssl proxy proxy_http
<VirtualHost *:80>
ServerName <yourdomain.com>; # Replace with your domain
Redirect permanent / https://<yourdomain.com> # Replace with your domain
</VirtualHost>
<VirtualHost *:443>
ServerName <yourdomain.com>; # Replace with your domain
SSLProxyEngine on
# Your SSL Certificate details. Replace with your own SSL setup
# SSLCertificateFile /path/to/cert
# SSLCertificateKeyFile /path/to/key;
<Location "/blog">
# Replace with your subdomain, https matters here
ProxyPass https://<yoursubdomain>.ghost.io/blog/
ProxyPassReverse https://<yoursubdomain>.ghost.io/blog/
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment