htdocs/JoesDirectory에서 XAMPP 파일을 어떻게 제공합니까?

htdocs/JoesDirectory에서 XAMPP 파일을 어떻게 제공합니까?

Windows에 관리자로 XAMPP를 설치했고 C:\xampp모든 것이 잘 작동하지만 http://n.n.n.n/URL을 입력하여 웹 브라우저에 내 컴퓨터의 IP를 지정하면 브라우저가 http://n.n.n.n/xampp/XAMPP 관리 패널에 액세스할 수 있는 곳으로 리디렉션됩니다. 그러나 탐색하는 사용자가 에서 http://n.n.n.n/index.html/ 파일을 볼 수 있기를 바랍니다 .index.phpC:\xampp\JohnDoesDirectory'

이 작업을 어떻게 수행할 수 있습니까?

답변1

이동하여 C:\xampp\apache\conf\httpd.conf줄을 변경하십시오.

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">

에게

#DocumentRoot "C:/xampp/htdocs"
#<Directory "C:/xampp/htdocs">
DocumentRoot "C:/xampp/htdocs/JohnDoesDirectory"
<Directory "C:/xampp/htdocs/JohnDoesDirectory">

그런 다음 XAMPP 제어판에서 Apache를 다시 시작합니다(중지, 시작을 차례로 클릭).

그러면 문제가 해결됩니다.

관련 정보