macOS 13 install PHP 8 and Apache config Apache Virtual Host All In One
目的:搭建本地 PHP 网站用于对
XSS
/CSRF
等 Web 攻击安全问题进行验证
macOS 13 & PHP 8.x
# PHP was deprecated in macOS 11 and removed from macOS 12
$ brew install php
# PHP 8.1.13
$ php -v
PHP 8.1.13 (cli) (built: Nov 24 2022 20:36:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
https://formulae.brew.sh/formula/php#default
PHP 8.2
Apache & PHP
# Apache 2
$ apachectl -v
Server version: Apache/2.4.54 (Unix)
Server built: Sep 30 2022 02:51:01
$ sudo apachectl start
$ sudo apachectl stop
$ sudo apachectl restart
error
macOS 系统自带的 Apache 配置 PHP 后,会出现无法访问问题 ❌ (macOS 不支持 PHP 了,配置了会导致服务器报错)
标签:httpd,macOS,local,13,usr,www,Apache,com From: https://www.cnblogs.com/xgqfrms/p/16972365.html