![]() SSLCertificateKeyFile "/Applications/MAMP/htdocs/server. SSLCertificateFile "/Applications/MAMP/htdocs/server.crt" #MAMP PRO HTTPS CODE#Search for nf file from Mamp folder and add following code at the end of file.(Configure the correct paths for DocumentRoot, SSLCertificateFile and SSLCertificateKeyFile) # Custom code for SSL #MAMP PRO HTTPS MAC#Subject=/C=IN/ST=MH/L=Localhost Mac World/O=Local Mac/OU=Web CA Private KeyĦ. Organizational Unit Name (eg, section) :Web DepartmentĬommon Name (eg, fully qualified host name) :localhostĮmail Address Create a certificate file ( server.crt) openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 500 -sha256 Organization Name (eg, company) :Local Mac Locality Name (eg, city) :Localhost Mac World If you enter '.', the field will be left blank. There are quite a few fields but you can leave some blankįor some fields there will be a default value, What you are about to enter is what is called a Distinguished Name or a DN. You should follow these steps in order, and only proceed to the next fix if the problem persists. #MAMP PRO HTTPS HOW TO#You are about to be asked to enter information that will be incorporated How to Fix the HTTP Error 500 in MAMP In this section, we’ll walk through troubleshooting each of the potential causes of an Error 500 on a MAMP WordPress installation. For example:- Generating a 2048 bit RSA private key Create a certificate key ( server.key) openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.keyĪnd enter all the data as prompted. Luckily, I had Time Machine on my Mac, so I was able to recover my settings and apply them to the new files. #MAMP PRO HTTPS UPDATE#I found out that doing a major MAMP update will blow away your nf file and your nf. This setup worked great for me until I updated MAMP from version 5 to 6. Note, if you’re running local WordPress sites, you’ll need to do a search and replace on the database to update the URLs. You should be able to access your local dev sites through the new URLs! If it doesn’t work, add “ to the beginning of the URL. Save all of the changes to your nf files, then re-start MAMP. Once you find it, set it to “All” like this: The solution is to go back into your nf file and search for “AllowOverride”. Basically, the home page would show up, but I couldn’t access any posts or pages. Set AllowOverride in Your nf FileĪfter I did these steps (and doing a search and replace on my site’s database to update the URLs), I got the site to resolve, but s were not working. If you were editing your nf file directly, you’re done with this step.Ĥ. I also added this entry so I could access the project root through a browser: Remember to change the DocumentRoot URL to the appropriate path to your sites on your computer. Now, for each domain name, add an entry to connect it to the appropriate directory path on your computer like this: ĭocumentRoot "/Users/username/projects/mysite"ĭocumentRoot "/Users/username/projects/anothersite"ĭocumentRoot "/Users/username/projects/yetanother" In nf, find this line and make sure it’s uncommented: Include /Applications/MAMP/conf/apache/extra/nf If you do this, make sure that your main nf file includes the nf file. Now, you can edit it directly, or do what I did, which is edit the nf file in the “extra” directory here: /Applications/MAMP/conf/apache/extra/nf ![]() You can find it here on MAMP for Mac: /Applications/MAMP/conf/apache/nf If you’re familiar with Apache, you know this happens in the nf file. Now you have to tell Apache which directory to use for each URL. You can choose whatever you want, but don’t use “.dev”, as that has been reserved for other purposes and won’t work in most browsers (I learned this the hard way back when I was using Desktop Server).ģ. ![]() Note, I decided to switch to the “.local” top-level domain for my local dev sites. Go ahead and edit it using your favorite text editor and add all your local development sites like this: 127.0.0.1 mysite.local The next step is to direct your local URLs to your localhost by adding them to your hosts file, which is located here on a Mac: /etc/hosts ![]() The settings on this page are misleading because port 80 is the actual default value that lets you eliminate the port number in the URL.Īfter restarting, MAMP, you should be able to access your local sites without the port number in the URL like this: 127.0.0.1/īut remember, none of your WordPress sites will work with this URL until you do a search and replace on the database, but we’re not there yet. Unfortunately, when I started using MAMP, I chose their “default” Apache port value of 8888. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |