<p>I am running MAMP locally on my laptop, and I like to test as much as I can locally. Unfortunately, since I work on e-commerce stuff (PHP), I normally force ssl in most of the checkout forms and it just fails on my laptop. Is there any easy configuration that I might be missing to allow "https" to run under MAMP? Please note, I know that I <strong>could</strong> configure Apache by hand, re-compile PHP, etc. but I'm just wondering if there's an easier way for a lazy programmer.</p>

<p>Thanks</p>

[{'answer_id': 41272, 'author': 'David Crow', 'author_id': 2783, 'author_profile': 'https://Stackoverflow.com/users/2783', 'pm_score': 2, 'selected': False, 'text': '<p>There doesn\'t seem to be an easier way, <a href="http://www.rocketwerx.com/blog/8-apple/34-getting-ssl-to-work-with-mamp-pro" rel="nofollow noreferrer">unless you\'re willing to buy MAMP Pro</a>.</p>\n\n<p>As far as I know, the only way to use SSL with MAMP is to <a href="http://www.macosxhints.com/article.php?story=20041129143420344" rel="nofollow noreferrer">configure mod_ssl for Apache</a>. mod_ssl is bundled with MAMP, and I found configuration to be pretty straightforward. Note that you\'ll probably have to start Apache from the command line to use it:</p>\n\n<pre><code>/Applications/MAMP/bin/apache2/bin$ ./apachectl stop\n/Applications/MAMP/bin/apache2/bin$ sudo ./apachectl startssl\n</code></pre>\n'}, {'answer_id': 43384, 'author': 'Rodney Amato', 'author_id': 4342, 'author_profile': 'https://Stackoverflow.com/users/4342', 'pm_score': 4, 'selected': True, 'text': '<blockquote>\n  <p><strong>NOTE: startssl is no longer supported after version 2+ of MAMP. You\n  have to update the config files (httpd.conf) to enable ssl.</strong></p>\n</blockquote>\n\n<p>You can modify the free version of MAMP to enable ssl by default very easily. Once you have setup all the SSL parts of apache and have it working so that calling apachectl startssl works, just edit the file </p>\n\n<pre><code>/Applications/MAMP/startApache.sh\n</code></pre>\n\n<p>in your favorite text editor and change the <strong>start</strong> argument to <strong>startssl</strong> and you will have the MAMP launcher starting apache in ssl mode for you.</p>\n'}, {'answer_id': 1795144, 'author': 'Riley', 'author_id': 218358, 'author_profile': 'https://Stackoverflow.com/users/218358', 'pm_score': 5, 'selected': False, 'text': '<p>First, make a duplicate of /Applications/MAMP.</p>\n\n<p>Open /Applications/MAMP/conf/apache/httpd.conf<br>\nBelow the line<br>\n<code># LoadModule foo_module modules/mod_foo.so</code><br>\nyou add<br>\n<code>LoadModule ssl_module modules/mod_ssl.so</code><br>\nRemove all lines <code>&lt;IfDefine SSL&gt;</code> as well as <code>&lt;/IfDefine SSL&gt;</code>.<br></p>\n\n<p>Open /Applications/MAMP/conf/apache/ssl.conf<br>\nRemove all lines <code>&lt;IfDefine SSL&gt;</code> as well as <code>&lt;/IfDefine SSL&gt;</code>.<br>\nFind the line defining <code>SSLCertificateFile</code> and <code>SSLCertificateKeyFile</code>, set it to<br>\n<code>SSLCertificateFile /Applications/MAMP/conf/apache/ssl/server.crt</code>\n<code>SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl/server.key</code></p>\n\n<p>Create a new folder /Applications/MAMP/conf/apache/ssl<br>\nDrop into the terminal an navigate to the new folder<br>\n<code>cd /Applications/MAMP/conf/apache/ssl</code><br>\nCreate a private key, giving a password<br>\n<code>openssl genrsa -des3 -out server.key 1024</code><br>\nRemove the password<br>\n<code>cp server.key server-pw.key</code><br>\n<code>openssl rsa -in server-pw.key -out server.key</code><br>\nCreate a certificate signing request, pressing return for default values<br>\n<code>openssl req -new -key server.key -out server.csr</code><br>\nCreate a certificate<br>\n<code>openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt</code></p>\n\n<p>Restart your server. If you encounter any problems check the system log file. The first time you visit <code>https://localhost/</code> you will be asked to accept the certificate.</p>\n'}]
['https://Stackoverflow.com/questions/41218', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4247/']