您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php服务器怎么配置

2024/3/13 21:38:13发布54次查看
配置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>
更改默认首页
<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服务器怎么配置的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product