我將下面的代碼添加到httpd.conf中,它可以工作。httpd.conf VS httpd-vhosts.conf
我刪除了下面的代碼並添加到httpd-vhosts.conf中,它也可以。
爲什麼xampp提供httpd-vhosts.conf如果常規文件名爲httpd.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>