시도 이러한 변화
우선이 WAMPS에 대한 액세스를 제어합니다. erver homepage, 가능한 모든 로컬 주소를 허용 목록에 추가하십시오.
목록에 2 개의 서브넷이있는 것 같습니다. 오타가 있습니까? 나는 그렇게 추측하고있다.
또한 IP 주소의 처음 3 개의 사 분위수를 사용하면 해당 서브넷의 모든 IP에서 허용됩니다.
// httpd.conf를
<Directory "D:/wamp/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from ::1 127.0.0.1 localhost
Allow from 192.168.1
</Directory>
당신은 당신의 가상 호스트 정의에 임의의 포트 번호를 언급하지 말아 특정 IP 주소를 사용할 필요가 없습니다.
또한 로컬 호스트 VHOST를 추가하고 각 VHOST 정의 내에 액세스 제한 즉 <Directory...>
블록을 추가하는 것이 좋습니다. 그런 다음 각 VHOST의 액세스 권한을 구체적으로 수정할 수 있습니다.
Apache 2.4.x에서 액세스 권한에 대한 구문도 있으므로 WAMPServer2.5 릴리스에 추가 된 매개 변수를 사용하여 액세스 권한 섹션을 코딩했습니다.하지만 여전히 사용자 권한으로 작동해야합니다. 이전 WAMPServer 버전 즉, 2.4 또는 2.2
// 엑스트라/아파치 - vhost.conf
# Should be the first VHOST definition so that it is the default virtual host
# Also access rights should remain restricted to the local PC and the local network
# So that any random ip address attack will recieve an error code and not gain access
<VirtualHost *:80>
DocumentRoot "D:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "D:/wamp/www">
AllowOverride All
<IfDefine APACHE24>
Require local
Require ip 192.168.1
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from 127.0.0.0/8 localhost ::1 192.168.1
</IfDefine>
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/wamp/www/mysite"
ServerName mysite.com
ServerAlias www.mysite.com
<Directory "D:/wamp/www">
AllowOverride All
<IfDefine APACHE24>
Require local
Require ip 192.168.1
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from 127.0.0.0/8 localhost ::1 192.168.1
</IfDefine>
</Directory>
</VirtualHost>
당신이 사용하는 WAMPServer의 버전은 무엇? – RiggsFolly
버전 2.5를 사용하고 있습니다. – Steven