Last Updated: February 25, 2016
· riyadhalnur
10309058 10152457564452360 4465802230248535815 n

Protect Ghost blog on NginX

After installing Ghost, you can protect the /ghost/signup/ directory by editing the configuration file.

sudo nano /etc/nignx/sites-available/mysite

In the server definition for your blog, add this line.

location ~ ^/(ghost/signup/) { rewrite ^/(.*)$ http://mysite.com/ permanent; }

Replace mysite.com with your domain name and then press Ctrl+X to save the file. Restart NginX for the changes to take effect.

sudo service nginx restart

Say Thanks

2 Responses
Add your response


Is this required? The below forum post states that only one user can be registered by default anyway (once you've registered your initial user account).


over 1 year ago ·
10309058 10152457564452360 4465802230248535815 n

Even though a single user can register, if the path is accessible, your whole site can be comprised. Think of it like how you deny all access to your wp-admin folder in WordPress.

over 1 year ago ·
Filed Under