Home > Backend Development > PHP Tutorial > MAC new site configuration PHP environment

MAC new site configuration PHP environment

不言
Release: 2023-03-23 20:50:01
Original
2079 people have browsed it

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:

Mac upgrade PHP 7

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template