Ghost in Subdirectory on Apache2


I’m attempting to serve Ghost as a sub-directory on my site ( using Apache2 to serve both Ghost and my main web app. I’ve followed most of the tutorials available out there.

I’m using the following setup:
Ghost-CLI version: 1.12.0
Ghost version: 3.0.0
Apache 2.4.29
Ubuntu 18.04

When I set Ghost to serve on the “/” root domain, it works perfectly. I accomplished this through mod_proxy rules on the VirtualHost config file in my apache2/sites-available folder:

ProxyPreserveHost On
ProxyPass /
ProxyPassReverse /


In an attempt to serve the blog on a sub-directory, I changed configuration information for both Ghost and Apache2. For Apache2 config, it looks like this:

ProxyPreserveHost On
ProxyPass /blog
ProxyPassReverse /blog

For Ghost config, I changed the URL to be: “

When I hit “/blog” on my site, it just says “Cannot Get /”. Looking at the header information, I see that Express is serving the 404 error page. Since my main app doesn’t use node, I’m pretty sure it’s getting to the Ghost application and then something is failing.

*I’ve tried all combinations of “/” at the end of the configuration lines.

I’m not sure what to try next. Any help would be greatly appreciated!

There’s a bug with certain types of proxying & 3.0, you’ll need to wait for this fix to be released:

1 Like

FYI - the fix landed in 3.0.1.

@m4tch4 I think you need to adjust your proxy rules a little to include the subdirectory…

ProxyPreserveHost On
ProxyPass /blog/
ProxyPassReverse /blog/

As you were using ProxyPreserveHost and didn’t have separate front-end/admin URLs you wouldn’t have hit the proxy-related bug in 3.0.0.