How Nexcess clients can use FTP and SSH to restrict access to web pages to one or more users.
You need both FTP and SSH access to the server hosting your website. See How to add FTP accounts with SiteWorx and How to enable SSH access for more information.
ATTENTION: Any input in brackets ([username], [dev.example.com], and so on) represents a placeholder. Replace the brackets and everything between them with the indicated information.
AuthType Basic AuthName "Password Protection" AuthUserFile /chroot/home/[username]/[dev.example.com]/.htpasswd Require valid-user
AuthType Basic AuthName "Password Protection" AuthBasicProvider file AuthUserFile /chroot/home/[username]/[dev.example.com]/.htpasswd <FilesMatch “[secret.php]”> Require valid-user </FilesMatch>
cd /chroot/home/[username]/[dev.example.com]/
htpasswd -nb [username] [password] > .htpasswdAfter this, you can use htpasswd -nbcommand to generate new username and password combinations to add to the .htpasswd file. For example:
htpasswd -nb [username2] [password2]
[username2]:$apr1$AvsmeS7S$Y.K4zIO6Abgw7zd.Hnq.W/
[username]:$apr1$MqnlWasH$zEF0/tORcU2GuRNFMhACj0 [username2]:$apr1$AvsmeS7S$Y.K4zIO6Abgw7zd.Hnq.W/
For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.
Our award-winning customer care team is here for you.
Contact Support