I have a PHP/MySQL website running on an Azure free default app service plan. I have an admin directory on the site and I want to password protect it so that it's not publicly accessible. I normally work on Linux/Apache and this is pretty easy to do with .htaccess or cpanel.
This blog post here:
seems like the way everyone's recommending to do it, but I'm having trouble following it. One of the main issues is that he assumes I set my app up using scaffolds but instead I created a free default app using the Azure web portal. So my directory structure at the start looks like this:
/site /diagnostics /wwwroot /locks /deployments /LogFiles ...
What are the instructions to password protect a directory on my website using this starting point?
You can use Azure easy auth,but the whole site will be password protected: https://azure.microsoft.com/en-us/blog/azure-websites-authentication-authorization/
You can use forms auth: http://blogs.msdn.com/b/silverlining/archive/2012/01/09/how-to-password-protect-a-php-website-directory-in-azure.aspx
Or you can use this HttpAuthenticationModule dll: https://github.com/nabehiro/HttpAuthModule#usage-for-php
You should be able to modify the web.config to restrict the path to be the /admin path.