LightBlog

Having an SSL ( Socket Secure Layer ) installed is one way to secure your website. Basically, SSL will encrypt data transactions between the...

How to Enable SSL for Localhost using MAMP

Having an SSL (Socket Secure Layer) installed is one way to secure your website. Basically, SSL will encrypt data transactions between the browser and the server. Thus, you would probably want to test your website in an SSL environment as early as during the development stages.
URLs and other website assets such as CSS and JavaScript are pointed correctly via the https protocol. So, how do we enable SSL in our localhost? It will require some command lines, file modifications, configurations and a few more cumbersome steps. But let’s bypass all that and use MAMP Pro instead. Here’s how to set it up. Note: MAMP Pro is also available for Windows now.

Enabling the SSL

Launch MAMP, and create a VirtualHost with a custom domain; this domain can be set in an extension like .dev or .local. In this case, I’ve created www.hongkiat.dev which is used to host www.hongkiat.com development.
                        

0 comments: