Safest bath to store .htpasswd for phpmyadmin?

  • Posted December 12, 2013

Hello, hope everyone’s OK… So I followed this article: And when i got to set up the htpasswd part, didn’t know where to store it, or what are the best practices applied. So, I tried a path kept getting internal server errors, till i stored it in var/www and it worked. For some reason i don’t feel like it should be kept there(i am new to this). Any help is appreciated, thanks…

Running: Ubuntu.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

<b>“For some reason i don’t feel like it should be kept there…”</b> <br> <br>The article also recommends that you should <b>not</b> store it there.<blockquote>… place the file in a directory of your choice as long as it is not accessible from a browser.</blockquote>

You shouldn’t store it in /var/www because anyone will be able to download it since apache is serving /var/www’s contents. You can create a directory in /etc/apache2 called <code>htpasswd</code> or whatever you like and store it in it e.g. <code>/etc/apache2/htpasswd/phpmyadmin</code>.