Password protect (http auth) all domains on server
Hi
How can I password protect all domains/sites on a server with http auth?
I added the following into httpd.conf but pressing cancel on the auth popup will show the page contents without any assets loading.
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /.htpasswd
Require valid-user
-
Hello :) What method are you using to make changes to the Apache configuration? It's important to use the instructions at: Advanced Apache Configuration - EasyApache - cPanel Documentation Also, I believe the directory has to be specific, as opposed to entering a wildcard character. How many accounts do you need to protect? Thank you. 0 -
I edited the httpd.conf directly just to test it but reverted it back after - I did see the message about it being overwritten and making sure to run the distiller. Is there alternative to using a wildcard? The server is essentially a testing server - it needs to be locked off from Google to stop client websites being indexed, but access from any IPs so we can't lock it down that way. They're all setup on a subdomain i.e. website1.testingserver.com We can modify each account but it's quite tedious as there's 100+ on there at the moment. 0 -
Is there alternative to using a wildcard? The server is essentially a testing server - it needs to be locked off from Google to stop client websites being indexed, but access from any IPs so we can't lock it down that way. They're all setup on a subdomain i.e. website1.testingserver.com
If the goal is to prevent Google or other search engines from indexing the websites, then you could setup rules to prevent that. There's a third-party thread on this at: Stop Google from indexing Thank you.0
Please sign in to leave a comment.
Comments
3 comments