Adding Basic Auth to Forge

Posted: 2016-08-18 23:13:21

make the username and password http://www.htaccesstools.com/htpasswd-generator/

admin:$apr1$wLiZDI74$/D64sfIdn74kHc6F.76Qv/

And save it in a file called, for example, htpass

Now scp -v htpass forge@your_server:~/

Go to forge and find the site and click "Edit Nginx Configuration"

Now in there just add these lines

        auth_basic            "Restricted Area";
        auth_basic_user_file  /home/forge/htpass;

As seen below

I think that will restart/reload Nginx, if does not go to the page that list your "Server Details" and restart there


Tags:

note2self