![]() Change the site address to reflect your newly added virtual host’s domain address If your website is using WordPress, you will need to update your Site Address ( site_url ) and WordPress Address either in your WordPress admin or WordPress Database `wp_options` table. You change the apache port of your MAMP installation from the default `8888` to port 80 and ensure your web server directory points to the correct folder path WordPress extras Troubleshooting Tips: if you encounter an error saying apache cannot start, you can force-start apache using this command sudo /Applications/MAMP/Library/bin/apachectl startĪlso look at your MAMP’s apache log files for any issues. SSLCertificateKeyFile "/Users/philsam/ssl/myshinywebsite.wp.key" SSLCertificateFile "/Users/philsam/ssl/myshinywebsite.wp.crt" TransferLog "/Applications/MAMP/logs/apache_ssl_access.log"ĬustomLog "/Applications/MAMP/logs/apache_ssl_request.log" "%t %h %x \"%r\" %b" SSLCipherSuite ALL:!ADH:!EXPORT56:RC4 RSA: HIGH: MEDIUM: LOW: SSLv2: EXP: eNULLĮrrorLog "/Applications/MAMP/logs/apache_ssl_error.log" XSendFilePath "/Applications/MAMP/htdocs/MyShinyWebsite" Paste the code below in your `nf`, change the DocumentRoot to reflect your path, ServerName and paths to your SSLCertificateFile and others NameVirtualHost *:443ĭocumentRoot "/Applications/MAMP/htdocs/MyShinyWebsite" Open /Applications/MAMP/conf/apache/nf and add this line near the bottom Includes directives, don’t forget to use your correct directory path to your MAMP installation Include /Applications/MAMP/conf/apache/extra/nf Remove or comment out the default virtual host found in this fileĬreate a new file nf in /Applications/MAMP/conf/apache/extra nano nf Then, open nano /Applications/MAMP/conf/apache/extra/nf `Include /Applications/MAMP/conf/apache/extra/nf` # Include /Applications/MAMP/conf/apache/extra/nf In MAMP, find your nf file, usually under your Applications directoryįrom terminal use your fav text editor vi or nano nano /Applications/MAMP/conf/apache/nf It is important you select the trust option, so you don’t have to go through the pain of having to be prompted to trust the certificate every time its requested. By selecting the trust option, our certificate created using our CA Authorithy will always be trusted. Open the Keychain Access tool from your Applications and drag the `myssl-authority.pem` file into the certificates windowĭouble click on the certificate `myshinywebsite.wp` and then click the Trust arrow to show the options, then select “Always Trust” option. Now, we need to add these files to our Apple Keychain. out myshinywebsite.wp.crt -days 1825 -sha256 -extfile myshinywebsite.wp.ext KeyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEnciphermentįinally, Lets create our certificate using this command openssl x509 -req -in myshinywebsite.wp.csr -CA myssl-authority.pem -CAkey myssl-authority.key -CAcreateserial \ Our new certificate has to include the Subject Alternative Name ( SAN) to prevent certificate errors as new browsers distrust certificates without the SAN. You can create multiple alias here such as DNS.2 = We will add our DNS entries in this file. We can now create a file `nano myshinywebsite.wp.ext`. Install the Certificate Authorithy openssl genrsa -out myshinywebsite.wp.key 2048Ĭreate a CA Signed Certificate openssl req -new -key myshinywebsite.wp.key -out myshinywebsite.wp.csr You will be prompted for a passphrase, it is recommended you add it, however, it is not required openssl genrsa -des3 -out myssl-authority.key 2048Įstablish your Certificate Authorithy, it will prompt you for some information like country, state, e.t.c openssl req -x509 -new -nodes -key myssl-authority.key -sha256 -days 1825 -out myssl-authority.pem ![]() Next, lets generate a Certificate Authorithy key ![]() Ensure you use your own Directory paths /User/YOUR_NAME/.įrom your preferred home directory create a folder `ssl` mkdir ssl
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |