问题一:误改ServerRoot 。
这个参数是WAMP服务器的系统ROOT,默认应该是 "X:\wamp\bin\apache\Apache2.2.21"
The top of the directory tree under which the server's configuration, error, and log files are kept.
压根就没仔细读注释。。。
解决- 利用windows自己的事件日志:
首先在系统Service中查看能否重启,然后在WAMP中删除,重新安装试试。
然后,系统service中无法重启,
根据对话框提示,到了系统事件日志中(Windows还是挺有好的)
“管理工具->事件查看器->Windows日志-->应用程序”
发现了原因:
01.The Apache service named reported the following error:
02.>>> httpd.exe: Syntax error on line 60 of C:/wamp/bin/apache/Apache2.2.21/conf/httpd.conf:
Cannot load C:/wamp/modules/mod_actions.so into server:
\xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3 .
对照着目录从新改了httpd.conf中的server root配置。。启动成功。
以后对于一些系统服务,配置问题,莫名其妙的原因和错误,可以多多利用这个工具。
问题二:如何添加新的文件夹和虚域名
在httpd.conf末尾(为了好找)加入如下:
<VirtualHost *:80>
ServerAdmin admin@waferm
DocumentRoot "D:\DEV Env\WebRoot\WebRoot"
ServerName waferm.com
<Directory />
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<Directory "D:\DEV Env\WebRoot\WebRoot">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
在到C:\WINDOWS\system32\drivers\etc\文件夹中的 hosts文件中加入:
127.0.0.1 waferm.com
就可以直接用waferm.com访问了