Remove the # in front of LoadModule php7_module libexec/apache2/libphp7.soħ. You will see the following: nf file with list of modulesĦ. Press Control+w to bring up a search option. Type sudo nano /etc/apache2/nf and press enter.Ĥ. Open Terminal from your Application folder or type “Terminal” in the Spotlight Search.ģ. You just need to enable the PHP from the Apache’s config file. To take effect all the changes made in the Apache config file. Include /private/etc/apache2/users/*.conf (This step is optional if you want to keep the copy of original config file) Type cd /etc/apache2/extra and press enter. # Controls who can get stuff from this server. # AllowOverride FileInfo AuthConfig Limit # It can be "All", "None", or any combination of the keywords: # AllowOverride controls what directives may be placed in. # The Options directive is both complicated and important. # Note that "MultiViews" must be named *explicitly* - "Options All" # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # Possible values for the Options directive are "None", "All", Your DocumentRoot configuration in nf will look like below: DocumentRoot "/Users/developer/Sites/" Replace AllowOverride None to AllowOverride All Press Control+w and type AllowOverride None. developer) DocumentRoot "/Users/USERNAME/Sites/" Note: USERNAME needs be replaced with your username (e.g. DocumentRoot "/Library/WebServer/Documents" (You can comment those two lines by putting # in front of them. Replace the below two lines with your username document root. Uncomment the following line for the User home directories. LoadModule authn_core_module libexec/apache2/mod_authn_core.so LoadModule authz_host_module libexec/apache2/mod_authz_host.so LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule include_module libexec/apache2/mod_include.so LoadModule rewrite_module libexec/apache2/mod_rewrite.so If you cannot find the module, use the Control+w and type in the module name you are searching for. Press Control+w and type LoadModule authz_core_module and press enter. (nf file will be opened in terminal’s editor. Type sudo nano /etc/apache2/nf and press enter. Press Control+x to exit the nano editor Configure the nf file Press Control+o and press enter to save the file. Options Indexes MultiViews FollowSymLinks nf.Ĭopy and paste the following configuration. Note: “username” will be your account name. If there is an existing nf, make a backup copy by typing sudo cp nf. Check if there is existing nf (username is your account name) Type cd /etc/apache2/users and press enter. If your username is developer the filename will be nf. (that is your account name / username)Ĭreate a nf file based on the account name showed up when you type whoami. To be able to recognize the files putting into Sites directory, nf needed to be setup. When the folder is created, it will generate a folder with compass image on the folder. Let’s create a Sites directory under username folder (username is your mac login name) This directory is going to be the document root.ġ. If Apache server is started, you should see the below: localhost on browser Create Sites directory Type localhost or 127.0.0.1 in the address bar Type sudo apachectl start and press enter. Open Terminal from your Application folder or type “Terminal” in the Spotlight Search. You can start off the built-in Apache server by following the below steps. For macOS Big Sur (11.0.x) setup guide, please check out Setting Up Your Local Web Server on macOS Big Sur 11.0.1 (2020)| MAMP | macOS, Apache, MySQL, PHP Start the Apache Server
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |