Getting SSL to work on MAMP (on OSX)

Just a quick note in case I have to do this again, I (finally) decided to get SSL working with my local environment, which in this case is MAMP. I’d avoided it for a while supposing it would be too much a pain. But I found a tutorial by webopius (“Getting MAMP working with SSL on OS X“) that made it relatively simple. That was easy enough, but I was getting 404s on everything, even after I disabled fancy url redirects, even on a plain html file outside the framework I’d been working within.

The problem:. I’d been developing from another path than the default MAMP installation and had changed this easily enough through MAMPs gui. I just didn’t realize that the DocumentRoot path for the SSL virtual host would also need to be changed. So, if you’re running into this same issue (or in case I run into the same issue again on another computer), simply go back to editing your ssl.conf, comment out the existing DocumentRoot site, and change it to your own real path, like so:


# General setup for the virtual host
# DocumentRoot "/Applications/MAMP/htdocs_ssl"
DocumentRoot "/your/real/path/goes/here/"

Save that and restart your apache service, and you should be good. And if that doesn’t work and you need to troubleshoot, have a look over your SSL error logs for more info. Good luck… πŸ™‚

Filed under:

4 responses to “Getting SSL to work on MAMP (on OSX)”

  1. Great note, I have put of using ssl for the same reason. I’ll have to look into this.

    Like

  2. Great note, I have put of using ssl for the same reason. I’ll have to look into this.

    Like

  3. Heh. I read this post initally in Google Reader and though it was Joseph Scott who posted it. πŸ™‚ I wonder if something like this will work on winders…

    Like

  4. It just might! πŸ™‚

    Like

Leave a comment