내 가상 호스트 파일 :
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp64/www/"
<Directory "C:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
및 프로젝트 가상 호스트:
<VirtualHost *:80>
ServerName www.tour.test
DocumentRoot "C:/wamp64/tour/public"
SetEnv APPLICATION_ENV "development"
<directory "C:/wamp64/tour/public">
DirectoryIndex index.php
AllowOverride all
Order Allow,Deny
Allow from all
</directory>
</VirtualHost>
답변1
귀하의 질문을 오해하고 있지 않다고 가정하면 범인은 두 가지일 수 있습니다.
로컬 주소 끝에 슬래시를 넣는 것을 잊었습니다(예:http://example.test/브라우저에서는 그렇지 않습니다.http://example.test).
당신은 가지고 있지 않습니다DNS로컬 도메인(예: )에 대해 올바르게 설정하세요
*.test
.
후행 슬래시와 관련하여 이는 현재 버전의 Chrome, Firefox 및 Opera에서 로컬 도메인에 필요합니다( localhost
이 처리가 필요하지는 않지만).
ServerName/ServerAlias 지시문에 대한 두 가지 작은 문제도 있습니다.
귀하의
localhost
항목에는 실제로 지시어가 필요하지 않습니다ServerAlias localhost
.호스트
www.tour.test
항목은 다음과 같이 시작해야 합니다.ServerName tour.test
ServerAlias www.tour.test, *.tour.test