Ghost in a Bottle

This afternoon I enjoyed some weird problems after an upgrade of my Ghost installation. Like every sucker forced to use open source software I never expect that installation instructions exist in the first place and thus did not waste time looking for them.

Open source software never comes with decent documentation because only developers that nobody else want work on open source software. Good developers can get hired and gain a salary to support their drinking problem or other vices.

Some malicious persons - I am looking at you Eddy - even would go around proclaiming that I cannot read. While it might be true that during a heavy drinking session in a nice bar in Singapore my vision might be slightly impaired, sometimes I do look halfway decent and can sort things out. It is only during drinking sessions that I start wondering why the hell must everyone sort things out and why should I look halfway decent anyway?

But my three immutable laws of Open Software Documentation have to wait, purpose of this blog is just to give you a quick solution to a configuration error in my installation instructions for the Ghost blogging platform.

The error was in the nginx.conf. You have to add the proxy_set_header items like this:

        location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ {
            proxy_redirect off;
            proxy_read_timeout 180s;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $host;
            proxy_cache one;
            proxy_cache_key "$scheme$host$request_uri";
            proxy_hide_header X-Powered-By;
            access_log off;
            expires 30d;
            add_header Pragma public;
            add_header Cache-Control "public, mustrevalidate, proxy-revalidate";

That's it!

Herman Stevens

Just some guy on the internet. Loves technology, diving, travelling, photography and Belgian Trappist beers.