a198107 2013-11-06 12:44 采纳率: 50%
浏览 2741
已采纳

php在配置apache虚拟主机时启动虚拟主机配置后就无法启动apache

在httpd.conf 配置虚拟主机:

Virtual hosts ,虚拟主机

Include conf/extra/httpd-vhosts.conf
将上一句Include这句话打开后,apache就无法启动了,而且其他的配置都检查了,没有问题。
查看了error.log (部分log)是这样的:
Starting the Apache2.2 service
The Apache2.2 service is running.
rmine the server's fully qualified domain name, using 113.57.80.135 for ServerName
[Fri Sep 27 15:21:59 2013] [notice] Apache/2.2.14 (Win32) configured -- resuming normal operations
[Fri Sep 27 15:21:59 2013] [notice] Server built: Sep 28 2009 22:41:08
[Fri Sep 27 15:21:59 2013] [notice] Parent: Created child process 2036
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 113.57.80.135 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 113.57.80.135 for ServerName
[Fri Sep 27 15:22:00 2013] [notice] Child 2036: Child process is running
[Fri Sep 27 15:22:00 2013] [notice] Child 2036: Acquired the start mutex.
[Fri Sep 27 15:22:00 2013] [notice] Child 2036: Starting 64 worker threads.

[Fri Sep 27 15:22:00 2013] [notice] Child 2036: Starting thread to listen on port 80.
[Fri Sep 27 15:46:37 2013] [notice] Parent: Received restart signal -- Restarting the server.
[Fri Sep 27 15:46:37 2013] [notice] Child 2036: Exit event signaled. Child process is ending.

  • 写回答

1条回答 默认 最新

  • franzhong 2013-11-08 01:54
    关注

    虚拟主机不是你这样配的吧
    基础的localhost能进行吧(httpd-vhosts.conf)

    <VirtualHost *:8081>
        ServerAdmin localhost:8081
        DocumentRoot "D:/xampp/htdocs/myTestFolder"
        ServerName abc.com
        ServerAlias www.abc.com
        ErrorLog "logs/dummy-host2.localhost-error.log"
        CustomLog "logs/dummy-host2.localhost-access.log" combined
    </VirtualHost>
    

    类似添加以上内容,另外用非80端口要添加Listen port检查是否开启netstat -an
    (host文件添加映射)
    apache 需重启

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 优质github账号直接兑换rmb,感兴趣伙伴可以私信
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)