

Implement the necessary access controls.For that, we're going to put blocks in your main server config that will: We haven't yet established external connectivity. With this in place, you can access: /awstats/?config=Xīut note that, at the moment, this is all available only via localhost. Inside that virtual host, include RewriteRules that translate path-based URLs into the appropriate query strings: RewriteRule /awstats/config/(.*) /awstats/?config=$1 Start by putting awstats on a virtual host that only listens to localhost. This will make your folder publicly accessible.Off the top of my head, here's one way you could do it. To remove a password protection of a directory, simply uncheck the check box in the Security Settings section and save your configuration. You can always add additional or remove existing users as well as change the login credentials via your cPanel → Directory Privacy section. You should be able to login with the authorized user you have just created. Input your username and password to test your settings. Now if you try to open your password protected directory via your browser you will be prompted with a login form to input your authorized user. When you are ready click on the Add/Modify authorized user button. Scroll down to the Create User section and input the desired username and password that will be able to access the password protected resource. To do so, please click on the Go Back button to return to the Password Protected Directories page. To give access to someone to access this folder via their web browser you will need to add a user and password pair. Now you have your directory password protected and it is not accessible for your visitors. When you are ready click on the Save icon to apply your settings. To activate the password protection on the directory click on the check box " Password protect this directory" and input a short message that will be displayed just above the login box when someone access this folder. Password protecting your public_html directory is a good idea if your website is still under development and you do not want to have it accessible by visitors or search engine bots. Password protecting the public_html folder will protect any file or folder on your hosting account and the public access will be denied, only people having the correct login details will be able to open your website and access files hosted on your account. If you would like to password protect the directory, click on the directory name.įor the purpose of this tutorial we will password protect the public_html directory. To expand a folder click on the yellow folder icon. You will be redirected to the Directory Privacy page where you can see the directory tree of your hosting account. Select the Web Root directory during the Directory selection and click on the Go button to proceed. To password protect a directory login your account's cPanel and refer to the Security section in your cPanel where you will locate the Directory Privacy icon. Password protection can be useful when you would like to have certain resources accessible only by a certain group of people.
#Awstats password protect how to#
In this tutorial we will show you how to password protect your directories and restrict web access.
