How to enable SSL for Localhost with MAMP

29080 - Emergenceingame


URLs and other web page elements such as CSS and JavaScript are represented via the https protocol. So how to enable SSL in Localhost? In this article, Emergenceingames.com will show you how to enable SSL for Localhost using MAMP.

Installing an SSL (Socket Secure Layer) certificate is one way to secure your website. Basically SSL will encrypt data transactions between the browser and the server. So you can test your website in an SSL environment right from the development stage.

how to enable ssl for localhost state mamp

However, the URL and other web page elements such as CSS and JavaScript are exposed over the https protocol. So in this article Emergenceingames.com will guide you how to enable SSL for Localhost using MAMP.

Enable SSL

Launch MAMP and create a VirtualHost with a custom domain name, which can be set to an extension like .dev or .local.

Each VirtualHost that you create in MAMP will have its own options that you can configure.

To enable SSL for VirtualHost, visit access the SSL tab and tick the option SSL. Then locate the SSL certificate (SSL certificate) file. If you already have an SSL certificate, locate and specify the files. If not, click the . button Self-Signed Certificate let MAMP generate the certificates for you.

To generate an SSL certificate, MAMP will ask you for some information such as the country code and the country you live in to assign in the certificate:

how to enable ssl for localhost in mamp 2

Save the file to the appropriate directory and SSL is set up.

how to enable ssl for localhost in mamp 3

Set up the Chrome browser to recognize your website

After enabling SSL for Localhost using MAMP , you can view your website through the protocol https. However, on the screen you will see the error message displayed as below. This is because the Chrome browser does not recognize your SSL certificate.

Note that if you run WordPress-based sites, you need to edit the siteurl and home input from table wp_options in the database.

how to activate ssl for localhost in mamp 4

If you have a site reliability issue, go to options Advancedthen click Proceed to {your website name} to view your website.

If a red X is displayed on the Chrome browser, you must force Chrome to trust the certificate you created:

First click on the keychain icon with the red X icon, then click on the link Certificate Information. On the Chrome window will display a popup window containing all the SSL certificate information specified in the website. Drag and drop the certificate icon to the desktop.

If you use Mac OS X, when you open the certificate file, you will be taken to the Keychain Access application.

how to activate ssl for localhost in mamp 5

Click select Always Trust. Select your site certificate then click the button [i] to display the certificate’s trust level details. In Trust tabyou will see the option When using this certificate.

The option default value is set to Use Custom Settings. To make your certificate trusted, set the value of this option to Always Trust, and you will be prompted to enter your password again to update this setting.

how to enable ssl for localhost in mamp 6

Everything was set up and considered done. Finally reopen your website on Chrome browser, you will now see a blue lock icon. That is, your SSL certificate is recognized as a trusted certificate.

how to activate ssl for localhost in mamp 7

https://thuthuat.Emergenceingames.com/cach-kich-hoat-ssl-cho-localhost-bang-mamp-29080n.aspx
So Emergenceingames.com just showed you how to enable SSL for Localhost with MAMP. Having your SSL certificate recognized as a trusted certificate is also a way to protect your website, so you should Implement SSL and HTTPS on WordPress enhanced security. If you have any comments or questions, please leave your comments in the comments section below the article.

Author: Nguyen Hai Son
(4.014 evaluate)
your rating?

Related keywords:

enable SSL for Localhost using MAMP

how to enable SSL for Localhost with MAMP, enable SSL for Localhost,

Source link: How to enable SSL for Localhost with MAMP
– Emergenceingames.com

Leave a Reply

Your email address will not be published. Required fields are marked *