我非常需要帮助。
我阅读了echoditto博客( http://www.echoditto.com/blog/never-touch-your-local-etchosts-file-os-x-again )上的文章,并遵循了在我的Mac上设置dnsmasq的build议使用自制软件。 现在我遇到了一个我无法解决的问题,我需要帮助,因为这完全削弱了我的开发工作。
最初,在执行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://domainname.dev/并加载该站点。
但是,使用Joomla,我遇到了mod_rewrite的问题:
我可以加载pipe理员后端没有问题浏览到http://domainname.dev/administrator/
我可以加载网站的主页没有任何问题,浏览到http://domainname.dev/
但是,如果我点击任何通常会加载一个子页面的链接,如http://domainname.dev/about,我得到一个404错误或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.
我试图切换回非dynamic虚拟主机,它不再工作。
我也无法通过将浏览器指向http://localhost/domainname.dev来访问这些网站
请尽快通知,否则,我将不得不彻底重新安装我的Mac,我无法承受停机时间。
我已经将我的httpd.conf文件,httpd-vhosts.conf文件和示例.htaccessfile upload到了一个要点: https ://gist.github.com/alisamii/6549754
此外,可能会注意到,我试图恢复到我在安装dnsmasq之前的设置,所以我可以使用URLschemehttp://localhost/path/to/site访问本地http://localhost/path/to/site但它不再有效,得到一个服务器configuration错误。