Password protect directories apache windows




















Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Ask Question.

Asked 10 years, 3 months ago. Active 6 years, 3 months ago. Viewed 14k times. Improve this question. Shane Madden k 12 12 gold badges silver badges bronze badges. Daniel Magliola Daniel Magliola 1, 9 9 gold badges 19 19 silver badges 32 32 bronze badges. Add a comment. Active Oldest Votes. For that purpose, you will need to change the ownership of that file with the following command:.

At this point our new user and password are ready. Now we need to tell Apache to request password when accessing our targeted directory. For that purpose, create file called.

Now save the file and put your setup to the test. Open your browser and enter your IP address or domain name in the web browser, for example:. If you are using shared hosting, you will most probably not have access to the Apache configuration file. This means that you will only need to generate the username and password and then select directory that you wish to protect. This significantly eases your task.

I hope that you found this tutorial useful and help you achieve your goal. If you have any questions or comments, please do not hesitate to post them in the section below. TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint!

Then restart Apache for the changes to take effect:. Ubuntu Create the restricted area Go to the directory you want to protect. For example:. Create a file called. Put the following into this file: CentOS Test the authentication To test the authentication, visit the password-protected URL in a browser.

Related Products. View packages. Two revelations solved the problem. My dns updater for No-IP was not running. Even though I cleared the browsing history and cache regularly, I didn't realize until just now, and after installing another browser for comparisons, that passwords and usernames were being held the length of the session. Once I closed the browser and reopened, and cleared the cache again, the password popup, popped up. Perhaps this will benefit someone. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Apache 2. Asked 3 years, 7 months ago.



0コメント

  • 1000 / 1000