【问题标题】:Am able to access site via my IP, but not localhost anymore我能够通过我的 IP 访问站点,但不再是 localhost
【发布时间】:2014-02-24 17:43:51
【问题描述】:

我正在使用 WAMP 在我的机器上安装一个 wordpress 网站,因此我总是在地址栏中输入“localhost”以访问该网站。 我一直启用 apache 重写模块 然后我有了让我们局域网上的人通过我的局域网 IP 访问该站点的想法。 为此,我编辑了 Apache 的 httpd.conf 文件的这一行(根据此页面上的说明 http://www.sourcecodester.com/tutorials/php/5155/how-access-wampserver-another-computer-lan.html):

# Controls who can get stuff from this server.
#
#    Require all granted
#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost

(我将“全部拒绝”更改为“全部允许”) 保存了文件, 通过 iPad mini 上的 IP 访问我的盒子,然后是另一台 Windows PC。 回到运行 WAMP 并且我正在开发网站的机器上,单击页面上的导航链接之一,然后我收到 500 Internal Server Error

所以我现在只能通过输入我自己的 IP 来查看 wamp 菜单和站点。一些图像未加载,并且在尝试通过在后面输入我的 IP 和“/wp-admin”来登录时出现错误 500它(意味着我也无法登录 wordpress 来编辑任何内容)

这里有什么问题?我真的需要能够访问'localhost'并继续开发网站,但我无法弄清楚这一点! 谢谢

【问题讨论】:

    标签: php wordpress apache


    【解决方案1】:

    尝试访问localhost/your-wp-dir-path/wp-admin/options-general.php并在

    WordPress 地址 (URL) 选项将值设为 http://localhost/your-wp-dir-path

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-17
      • 2018-03-03
      • 1970-01-01
      • 2015-03-05
      • 2014-03-15
      • 1970-01-01
      相关资源
      最近更新 更多