9skutq
Last Updated: February 25, 2016
·
1.23K
· riyadhalnur

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

2 Responses
Add your response

11177

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).

https://ghost.org/forum/bugs-suggestions/595-disable-signup

over 1 year ago ·
11185

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