漏洞扫描真的是没谁了,什么东西都要最新的,Apache要2.4.54的,php要7.3版本以后的,这个真的是要求高啊。这个环境估计得自己搭,才能满足这么变态的要求。所以,今天就记录一下搭建的过程。
1、Apache httpd
官方网站Index of /httpdhttps://downloads.apache.org/httpd/
这个地方是源码的下载地址,官方是这么说的
The Apache HTTP Server Project itself does not provide binary releases of software, only source code. Individual committers may provide binary packages as a convenience, but it is not a release deliverable.
If you cannot compile the Apache HTTP Server yourself, you can obtain a binary package from numerous binary distributions available on the Internet.
Popular options for deploying Apache httpd, and, optionally, PHP and MySQL, on Microsoft Windows, include:
官方不提供win版本的二进制下载,推荐这5个地方去下载。都是国外的,慢的很。
百度网盘 链接:https://pan.baidu.com/s/1MSObXAft9-FkzpfJ8ea4EQ
提取码:hkcd
自己整一份,已备所需。
下载解压后用管理员运行cmd到解压路径进入bin文件夹 ,运行httpd -k install -n yourservername
看看,这就是不调整配置文件的下场。
动备份文件前先备份。(改个名就行)
配置文件 conf/httpd.conf 37行
Define SRVROOT "E:\mywamp\bin\Apache24"
服务起不来,一定是配置问题,可以用
httpd -t
检查配置文件
OK,基本配置完成。
下一段配置php
2、php8.1
php的网络好于apache,下个东西还是可以接受的
这个是php官方对于TS(线程安全)和NTS(非线程安全)的选择建议。
TS and NTS
TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).
不是太理解,欢迎大大评论解释一下这个玩意。
下载zip包,解压到文件夹
httpd.conf文件中添加
LoadModule php_module "E:\mywamp\bin\php-8.1.8-Win32-vs16-x86\php8apache2_4.dll"
PHPIniDir "E:\mywamp\bin\php-8.1.8-Win32-vs16-x86\"
修改
-
<IfModule dir_module> DirectoryIndex index.html index.php </IfModule>
<IfModule mime_module>
#记得是添加,不是修改
AddType application/x-httpd-php .php
</IfModule>
修改httpd.conf251 252行
DocumentRoot "E:\mywamp\www"
<Directory "E:\mywamp\www">
重启服务,凡是遇到服务起不来的,请去检查配置文件,一切一切的错误都来自于配置文件。
两个搞完,文件夹92M
搞定两个了,其实mysql需要说的也不多吧,下一篇写mysql、redis、mongo的集成吧。