9skutq
Last Updated: February 25, 2016
·
1.204K
· 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
Respond

2 Responses
Add your response

11177
Cc7df58460892c18d17acdea8126a588

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