Mac OS X Mountain Lion에서 mod_rewrite와 제대로 작동하도록 dnsmasq 구성

Mac OS X Mountain Lion에서 mod_rewrite와 제대로 작동하도록 dnsmasq 구성

도움이 절실히 필요해요.

echoditto 블로그에서 기사를 읽었습니다(http://www.echoditto.com/blog/never-touch-your-local-etchosts-file-os-x-again) 홈브류를 사용하여 Mac에서 dnsmasq를 설정하기 위한 권장 사항을 따랐습니다. 이제 해결할 수 없는 문제가 생겼고, 개발 작업이 완전히 중단되었기 때문에 도움이 필요합니다.

처음에는 dnsmaqs를 구현한 후 사이트를 전혀 로드할 수 없었습니다. 하지만 httpd-vhosts.conf 파일의 내용을 다음과 같이 변경하여 해당 문제를 해결할 수 있었습니다.

#allow access to the Hosts directory where your sites are
<Directory "/Volumes/sites">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    #you could configure the following to only allow access from localhost
    Order allow,deny
    Allow from all
</Directory>

#get the server name from the Host: header
UseCanonicalName Off
VirtualDocumentRoot /Volumes/sites/%0/

이제 브라우저에서 다음을 가리킬 수 있습니다.http://도메인이름.dev/사이트를 로드하도록 하세요.

그러나 Joomla를 사용하면 mod_rewrite에 문제가 있습니다.

다음을 검색하여 문제 없이 관리자 백엔드를 로드할 수 있습니다.http://domainname.dev/administrator/

다음을 탐색하면 문제 없이 사이트의 홈 페이지를 로드할 수 있습니다.http://도메인이름.dev/

그러나 일반적으로 다음과 같은 하위 페이지를 로드하는 링크를 클릭하면http://domainname.dev/about404 오류 또는 500 오류가 발생하고 다음 페이지 내용이 표시됩니다.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

비동적 가상 호스팅으로 다시 전환해 보았지만 더 이상 작동하지 않습니다.

또한 브라우저를 다음으로 지정하여 사이트에 액세스할 수 없습니다.http://localhost/domainname.dev

가능한 한 빨리 조언해 주시기 바랍니다. 그렇지 않으면 Mac을 완전히 다시 설치해야 하고 가동 중지 시간을 감당할 수 없기 때문입니다.

내 httpd.conf 파일, httpd-vhosts.conf 파일 및 샘플 .htaccess 파일을 gist에 업로드했습니다.https://gist.github.com/alisamii/6549754

또한 URL 구성표를 사용하여 로컬 사이트에 액세스할 수 있도록 dnsmasq를 설치하기 전의 설정으로 되돌리려고 시도했지만 http://localhost/path/to/site더 이상 작동하지 않고 서버 구성 오류가 발생한다는 점에 주목할 필요가 있습니다.

관련 정보