![]() Save the settings and get MAMP to restart the servers.Īnd that’s it! The next time you access the site it will ask you for a username and password before you can access it. In that box add the following, making sure you change the path of ‘AuthUserFile’ to match your path: I’m using MAMP Pro 4.4.1 so things might vary on your version. ![]() see the third post down in the right hand column at. Select the host and click the Apache tab and you should see a text box for ‘Additional parameters for directive:`. I'm running across a problem developing a site locally using OS X 10.10 and MAMP Pro 3.0.5 with PHP 5.5.10. I just wanted to password protect one of my sites in MAMP, so it needs to be set up as a host. Now we need to tell MAMP Pro to use it for a site. You will be asked to supply a password and then confirm it. Htpasswd -c /Users/igp/web/.htpasswd iain Then run the htpasswd command using the -c argument to create the file, passing the username: To create the username and password file we can use the htpasswd tool that comes installed on a Mac by default.Ĭhoose where you want to store the password file and make sure the directory exists: I’m using MAMP Pro for my local sites and as I couldn’t find a post about setting up basic auth on MAMP Pro, I thought I’d best document it – even just for myself googling in the future. ![]() To try and recreate the issue I needed to password protect my local development site in the same way. Recently I needed to debug an issue that was happening on a staging site that is protected by basic authentication. How To Set up Password Authentication on a Site with MAMP Pro JUncategorized ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |