I tried various solutions posted in this thread and had no joy (a long and frustrating process!). Restart your browsers and open It should work. Then click "Trust" and set "When using this certificate" to "Always Trust." You should see a localhost certificate appear.Browse to the server.crt file and import it.Hit Command (⌘) + Spacebar and type Keychain Access to open Keychain Access.SSLCertificateKeyFile /Applications/MAMP/conf/apache/server.key SSLCertificateFile /Applications/MAMP/conf/apache/server.crt In the MAMP Preferences tags (it's a pretty big block of text) with the following code:.I figured out how to do this using a bunch of different sources. The encryption of the self-signed certificate wasn't strong enough and mentioned, you need a subjectAltName. TransferLog "/Applications/MAMP/Library/logs/access_log"Īnd edit in your DocumentRoot and ServerName settings: ServerName ServerAdmin "/Applications/MAMP/Library/logs/error_log" # General setup for the virtual hostĭocumentRoot "/Applications/MAMP/Library/htdocs" In /Applications/MAMP/conf/apache/extra/nf, find the following block and edit the fields Server Name and Document Root with the values you already have in your vhost. Keep your vhost in /Applications/MAMP/conf/apache/extra/nf just the same. Open /Applications/MAMP/conf/apache/nf and uncomment Include /Applications/MAMP/conf/apache/extra/nf. $ cp server.key /Applications/MAMP/conf/apache $ cp server.crt /Applications/MAMP/conf/apache # Move the certificate into your MAMP apache configuration folder $ openssl rsa -in server.tmp -out server.key # remove the password from the server key $ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt Organizational Unit Name (eg, section) : DevelopmentĬommon Name (eg, YOUR name) : localhostĮmail Address : challenge password : # leave this emptyĪn optional company name : # leave this empty Organization Name (eg, company) : Your Company State or Province Name (full name) : Quebec $ openssl req -new -key server.key -out server.csr # generate certificate signing request (same password as above) $ openssl genrsa -des3 -out server.key 1024 # generate a private key (will request a password twice) Generate a (dummy) SSL Certificate $ cd ~ īackup your /Applications/MAMP/conf/ dir. Well, that's copy that here just in case. Now comes the easy part, you just have to follow what this guy wrote here. Just go to MAMP > Preferences > Ports Tab and click the Set to default Apache and MySQL ports. Now you should be able to use port 80 (and almost any other) in MAMP. $ launchctl unload -w /System/Library/LaunchDaemons/ $ launchctl load -w /System/Library/LaunchDaemons/ If you don't see MAMP, you are in good hands, I have just the thing for you: # I've forced the removal of the job Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand) ps If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. You can check it like this: sudo lsof | grep LISTEN This is a "heat check" if you don't have any process jamming http ports. First of all you need to be able to run MAMP in port 80.
0 Comments
Leave a Reply. |