配置php服务器的方法:1、设置根目录、域名和目录权限;2、更改默认首页;3、更改监听端口,如80端口;4、配置虚拟主机,指定虚拟目录路径。

服务器配置
(视频教程推荐:java视频教程)
1、虚拟目录配置
<VirtualHost _default_:80>
#设置根目录
DocumentRoot "G:\phpStudy\PHPTutorial\phpMyAdmin"
#设置域名
ServerName www.phpmyadmin.com
#目录权限
<Directory "G:\phpStudy\PHPTutorial\phpMyAdmin">
#允许将目录结构用索引的方式展示
Options +Indexes +FollowSymLinks +ExecCGI
#允许覆盖;,用来做分布式部署
AllowOverride All
#执行顺序,先允许,后拒绝
Order allow,deny
#允许所有请求
Allow from all
Require all granted
</Directory>
</VirtualHost>更改默认首页
立即学习“PHP免费学习笔记(深入)”;
一个经过完善设计的经典网上购物系统,适用于各种服务器环境的高效网上购物系统解决方案,shopxp购物系统Html版是我们首次推出的免费购物系统源码,完整可用。我们的系统是免费的不需要购买,该系统经过全面测试完整可用,如果碰到问题,先检查一下本地的配置或到官方网站提交问题求助。 网站管理地址:http://你的网址/admin/login.asp 用户名:admin 密 码:admin 提示:如果您
0
<IfModule dir_module>
DirectoryIndex index.html index.php index.htm l.php
</IfModule>更改监听端口
Listen 80
2、虚拟主机配置
<VirtualHost _default_:80>
DocumentRoot "C:\web1" #指定虚拟目录路径
ServerName www.baidu.com # 虚拟目录绑定的域名
DirectoryIndex aa.php # 默认首页
<Directory "C:\web1">
Options -Indexes -FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>相关推荐:php培训
以上就是php服务器怎么配置的详细内容,更多请关注php中文网其它相关文章!
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号