Mamp localhost解析速度很慢 [英] Mamp localhost resolving very slowly

查看:319
本文介绍了Mamp localhost解析速度很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我对PHP/WordPress网站进行本地更改时,本地主机似乎在20-30分钟内没有更新.

When I make local changes to my PHP / WordPress website, the localhost does not seem to update for 20-30 minutes.

我在Mac OSX 10.8.4上并使用MAMP Pro.我有两个站点,分别为其创建了单独的主机条目,我们将它们称为mysite1.devmysite2.dev.

I'm on Mac OSX 10.8.4 and using MAMP Pro. I have two sites that I have created separate host entries for, let's call them mysite1.dev and mysite2.dev.

这是我的MAMP Server配置:

Here is my MAMP Server configuration:

Apache: 80
MySQL: 3306
SSL: 443

我看到了这篇文章(

I saw this article ( How can I eliminate slow resolving/loading of localhost/virtualhost (a 2-3 second lag) on Mac OS X Lion? ) on the Bonjour conflicts and edited my /private/etc/hosts file with the suggestions in this article:

  1. 我将主机名从mysite1.localhost更改为mysite.dev,因为这听起来像是与.local名称的冲突-无效

  2. 我将Hosts文件更新为具有单独的::1地址-无效:

  1. I changed the host names from mysite1.localhost to mysite.dev because it sounds like the conflict is with .local names - DID NOT WORK

  2. I updated the Hosts file to have separate ::1 addresses - DID NOT WORK:

::1 <tab> mysite1.dev
::1 <tab> mysite2.dev

  • 我尝试将所有主机条目放在一行上-也不起作用:

  • I tried putting all of my host entries onto one line - also didn't work:

    127.0.0.1 localhost mysite1.dev mysite2.dev
    ::1 localhost
    fe80::1%lo0 localhost
    

  • 每次重新启动服务器时,MAMP Pro似乎都覆盖了主机文件.

    我将非常感谢您能提供的任何帮助.

    It seems like MAMP Pro overwrites the hosts file any time I restart the server.

    I would be SUPER grateful for any help you can offer.

    推荐答案

    将MAMP缓存更改为OPcache.它为我工作

    Change MAMP cache to OPcache. It worked for me

    这篇关于Mamp localhost解析速度很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆