我在httpd.conf中添加了下面的代码,它可以工作。
我删除下面的代码并添加到httpd-vhosts.conf中,它也能工作。
如果名为httpd.conf的常规文件可以自己运行,为什么xampp提供httpd-vhosts.conf?
示例:
<VirtualHost 127.0.0.2:80>
DocumentRoot "F:/server/htdocs"
ServerName google.com
ServerAlias www.google.com
ErrorLog "logs/google.com-error.log"
CustomLog "logs/google.dec-access.log" combined
<Directory "F:/server/htdocs">
Options Indexes FollowSymLinks ExecCGI Includes
Order allow,deny
Allow from all
AllowOverride All
Require all granted
</Directory>
</VirtualHost>发布于 2014-01-25 03:13:05
Apache的某些发行版提供了一些在应用维护时将被覆盖的文件,还有一些未为用户保留的文件。从Apache透视图中创建的所有配置文件都是相等的。
发布于 2016-09-27 12:46:54
在httpd.conf中,您有“包含”参数。它包含另一个conf文件的路径--在您的示例中,它是httpd-vhosts.conf的路径。
https://stackoverflow.com/questions/21325686
复制相似问题