程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> apache虛擬主機配置-php在配置apache虛擬主機時啟動虛擬主機配置後就無法啟動apache

apache虛擬主機配置-php在配置apache虛擬主機時啟動虛擬主機配置後就無法啟動apache

編輯:編程綜合問答
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.

最佳回答:


虛擬主機不是你這樣配的吧
基礎的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 需重啟

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved