
현재 Apache와 함께 xampp을 사용하여 가상 호스트를 사용하여 시작하려고 합니다. http-vhosts.config에서 내 코드에 어떤 문제가 있는지 알 수 없습니다. 많은 튜토리얼을 따르고 문제 해결 포럼을 많이 읽었지만 가상 호스트를 구현하려고 하면 아파치가 시작되지 않는 이유를 이해할 수 없습니다. 지금은 로컬 호스트를 작동시키려고 노력 중입니다.
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>