dmx1 0 Posted November 11, 2020 Report Share Posted November 11, 2020 Hi Larry, Hope you are well. I am having serious problems trying to implement a ssl certificate in order to test the https://localhost/checkout.php page in chapter 10. I am using a macbook pro, and using mamp. I tried created all the necessary files needed to to generate the certificate, but my problem starts when i try and edit the httpd.conf and http-ssl.conf files. In the httpd.conf file i have the following settings: Listen 8888 ServerName localhost:8888 Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf In my httpd-ssl.conf file I have: Listen 443 <VirtualHost *:443> ServerName localhost:8888 SSLCertificateFile "/mypath/server.crt" SSLCertificateKeyFile "/mypath/server.key" I then try and restart the apache server, but it states that apache cannot be started with those settings. I then changed the port to 80, and apache started, but i encountered other problems when trying to load the ecommerce site from localhost. Can you tell me a way I can run ssl on localhost so i can navigate to the https://localhost/checkout.php page and thus throughout the site please. Thank you. regards Quote Link to post Share on other sites
Larry 428 Posted November 13, 2020 Report Share Posted November 13, 2020 Hmmm...this can be tricky. I'd start by re-evaluating whether it's really necessary to enable SSL on your Mac. Eventually I stopped bothering (I was never using real data that needed to be protected and since it's localhost, the data isn't leaving my computer regardless). But if you do want to continue the first trick is to figure out exactly why Apache doesn't like those settings. I normally start with Apache's "configtest" command, but you'll need to run that using MAMP's Apache. For the Mac's primary Apache you'd run `apachectl configtest`. Unfortunately I don't know what the properly path is to use MAMP's Apache instead, so you'll need to figure that out. Once you do that, `configtest` should give a specific error that can help debug this properly. Quote Link to post Share on other sites
dmx1 0 Posted November 16, 2020 Author Report Share Posted November 16, 2020 Hi Larry, Thanks for your response. Very much appreciated. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.