Home > Article > Backend Development > MAC new site configuration PHP environment
This article mainly introduces the PHP environment configuration for new MAC sites. It has certain reference value. Now I share it with everyone. Friends in need can refer to
site New site: 85
Enter in the terminal: open /etc (enter the directory)
Find: private-etc-apach2-extra-httpd-vhosts.conf
Listen 85
DocumentRoot /Volumes/work/site/85/public
DirectoryIndex index.html index.php index.htm
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
Go to the terminal and restart apach: sudo apachectl restart
--------------------------------- -------------------------------------------------- ----
Continue to find: prvate-etc-apach2-httpd.conf (open with sumbmit text3)
About 169:#LoadModule rewrite_module libexec /apache2/mod_rewrite.so (remove the preceding # to enable redirection)
About 171: #LoadModule php5_module libexec/apache2/libphp5.so (remove the preceding # to enable redirection)
About 239: DocumentRoot" /users/work/site” Management Path
About 511: #Include /private/etc/apache2/extra/httpd- vhosts.conf After removing #, it is allowed to configure the site in httpd-vhosts.conf
and then go to the terminal to restart apach: sudo apachectl restart
------------- -------------------------------------------------- ---------------------
Every new site must obtain the highest permissions
In the terminal: sudo chmod -R 777 (drag the path to open all the highest permissions)
Related recommendations:
Configuring the MAMP PHPStorm environment under Mac
The above is the detailed content of MAC new site configuration PHP environment. For more information, please follow other related articles on the PHP Chinese website!