![]() Uncomment the socache_shmcd_module (line 92): LoadModule socache_shmcb_module lib/httpd/modules/mod_socache_shmcb.so Uncomment the following ServerName option (line 223) to silence some annoying warnings that might else appear. Change user and group (line 193 and 194) to your username on your Mac, and to staff. Uncomment the inclusion of ssl settings (line 523): Include /usr/local/etc/httpd/extra/nfĪlso, uncomment the inclusion of mod_ssl (line 150): LoadModule ssl_module lib/httpd/modules/mod_ssl.so We will include secure SSL/TLS connections. Uncomment the inclusion of mod_rewrite (line 181): LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so Uncomment the inclusion of virtual hosts settings (line 506) so that it looks like this: Include /usr/local/etc/httpd/extra/nf Find Listen 8080 (probably on line 52) and change it to: Listen 80 For Intel Mac users, the folder is /usr/local/etc/httpd/. Navigate to the folder /opt/Homebrew/etc/httpd/. # Host Database # localhost is used to configure the loopback interface # when the system is booting. I will stick with two: domain.local and second.local.Īlso uncomment the last line ::1 localhost. Open that in any text editor.Īfter 127.0.0.1 localhost, type in the domains you want to setup development for. In there you will find the file hosts, without a file extension. In Finder you will be able to find this as a subfolder to Macintosh HD. I can confirm that it also works with Mac, having setup this on both types. ![]() ![]() This guide will focus on the Apple silicon setup. This is where some of your paths might differ, because Intel Macs and Apple silicon Macs operates with a different folder structure for the relevant files. We can install Apache (httpd) and PHP (php) simultaneously with one simple command in Terminal. Open Terminal in macOS and paste the following code from brew.sh to install Homebrew. To do it all, I will use the package manager Homebrew. In this post I will guide you through setting up a local server with SSL. Looking to run your PHP webpage locally on your Mac? Look now further.
0 Comments
Leave a Reply. |