
現在、Apache で xampp を使用して仮想ホストを起動しようとしています。http-vhosts.config のコードのどこが間違っているのかわかりません。多くのチュートリアルに従い、トラブルシューティング フォーラムをたくさん読みましたが、仮想ホストを実装しようとすると Apache が起動しない理由がわかりません。現在は、ローカル ホストを動作させようとしているところです。
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "e:/xampp/htdocs"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<Directory "E:/xampp/htdocs">
Options Includes FollowSymLinks
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
::1 localhost
127.0.0.1 foo.local
答え1
これを試してください。VirtualHostタグにディレクトリタグを追加します。
<VirtualHost *:80>
<Directory "E:/xampp/htdocs">
</Directory>
</VirtualHost>