【问题标题】:how to access localhost website from diffrent computers other than hosted computer with local area connection如何从具有本地连接的托管计算机以外的不同计算机访问 localhost 网站
【发布时间】:2016-10-16 08:46:53
【问题描述】:

我尝试从其他计算机上打开我的网站,执行步骤中解释的步骤

How do I connect to this localhost from another computer on the same network?

它也工作得很好。但是在“步骤 3b”中,我需要更改主机文件以打开它,并且我不希望我希望网站在给出 url 后打开而不在其他电脑上进行更改,或者希望通过在 httpd 中提供客户端 ip 来限制访问-vhosts.conf。我希望所有访问网站的计算机都连接在局域网中。

我该怎么做?

我尝试编辑 httpd-xampp.conf

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Allow from all
    Allow from ::1 127.0.0.0/8 \
        fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
        fe80::/10 169.254.0.0/16

    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

它也不起作用......

【问题讨论】:

  • 如果您通过 IP 访问,则不需要这些更改

标签: php mysql apache localhost


【解决方案1】:

这可能会对您有所帮助。

  1. 使用静态 IP 地址设置您的电脑,例如 192.168.1.200
  2. 在您的 htdocs/www 目录中创建服务器目录
  3. 并使该服务器目录共享
  4. 将你的appache配置文件中的localhost端口改为1234
  5. 重启 xampp/wamp 服务器。

    现在转到其他系统并点击此网址:192.168.1.200:1234/server/your-project

设置静态iphttp://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/

更改本地端口How to change XAMPP apache server port?

【讨论】:

  • 应该从哪个文件更改 localhost 端口?
猜你喜欢
  • 2014-11-18
  • 2015-09-10
  • 2015-10-02
  • 2018-11-28
  • 1970-01-01
  • 1970-01-01
  • 2016-09-15
  • 2020-01-07
  • 2012-08-04
相关资源
最近更新 更多