가상 도메인 이름 설정
1. 호스트 파일 수정: C:WindowsSystem32driversetc, 추가(예:
localhost doma.com
<Directory /> AllowOverride none Require all denied </Directory>은
<Directory /> #AllowOverride none #Require all denied AllowOverride all Order deny,allow Allow from all </Directory>
<VirtualHost *:80> ServerAdmin doma.com DocumentRoot "c:/wamp/www/doma" ServerName doma.com ServerAlias www.dummy-host.example.com ErrorLog "logs/dummy-host.example.com-error.log" CustomLog "logs/dummy-host.example.com-access.log" common </VirtualHost>Apache 서비스를 다시 시작하고 도메인 이름 doma.com에 액세스합니다.
그런데 오류가 발생했습니다 문제, 로컬호스트 접속 문제, 다른 디렉토리에서 보고된 오류
403 Forbidden You don't have permission to access / on this server
404 Forbidden The requested URL was not found on this server오류를 해결할 수 없습니다. 원본 수정 사항을 삭제하고 서버를 다시 시작해도 위 오류가 계속 발생합니다. 이해할 수 없습니다
혈액 칼슘 https-vhosts.cong 파일이 필요합니다. 그 파일에 모두
<VirtualHost *:80> ... </VirtualHost>주석을 달고, httpd.cong 파일을 수정합니다.
<Directory /> #AllowOverride none #Require all denied Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order deny,allow Allow from all </Directory>문제는 해결됨, 가상도메인 이름 설정실패, 해결방법 고민 필요
이상에서는 관련 측면을 포함하여 Apache 가상 도메인 이름의 설정을 소개했습니다. PHP 튜토리얼에 관심이 있는 친구들에게 도움이 되기를 바랍니다.