一、Define SRVROOT的意思是定义了一个名为SRVROOT的变量
Define SRVROOT "E:/PHPWEB/Apache24"
- ServerRoot = Web服务器可执行文件/目录的路径
ServerRoot "${SRVROOT}"
- DocumentRoot =服务器提供的文件的路径
DocumentRoot "${SRVROOT}/htdocs"
- 该
<Directory>指令用于配置特定目录的设置。
<Directory "${SRVROOT}/htdocs">
- ServerAdmin 指令=服务器返回给客户端的错误信息中包含的管理员邮件地址
ServerAdmin admin@example.com
- ServerName=IP地址
ServerName localhost:8090
二、设置监听端口
Listen 8090
三、PHP配置
设置php路径
PHPIniDir "E:/PHPWEB/php-5.6.37-Win32-VC11-x64"
设置php module
LoadModule php5_module "E:/PHPWEB/php-5.6.37-Win32-VC11-x64/php5apache2_4.dll"
设置文件后缀
AddType application/x-httpd-php .php .html .htm
安装服务,进入bin目录
httpd.exe -k install
卸载
sc delete apache2.4
参考:
本文详细介绍了Apache服务器的配置过程,包括定义服务器根目录、文档根目录、监听端口及PHP模块配置。通过具体实例,展示了如何设置ServerRoot、DocumentRoot、监听端口8090及PHPIniDir等关键参数。
1万+

被折叠的 条评论
为什么被折叠?



