Windows 7 如何从LAN中的另一台PC访问我的本地主机?

Windows 7 如何从LAN中的另一台PC访问我的本地主机?,windows-7,wamp,lan,Windows 7,Wamp,Lan,我正在使用WAMP服务器运行我的网站。我正在使用Windows7 我在两台电脑之间创建了局域网,我想从第二台电脑访问我的本地主机。 请注意,我没有使用Internet连接,因此无法使用IP地址 请给我你的建议。实际上,使用ip地址不需要互联网连接。局域网中的每台计算机都有一个内部IP地址,您可以通过运行 ipconfig /all 在cmd中 您可以使用服务器的ip地址(可能是192.168.0.x或10.0.0.x)远程访问网站 如果您找到了ip,但仍然无法访问该网站,这意味着WAMP没有配

我正在使用WAMP服务器运行我的网站。我正在使用Windows7

我在两台电脑之间创建了局域网,我想从第二台电脑访问我的本地主机。 请注意,我没有使用Internet连接,因此无法使用IP地址


请给我你的建议。

实际上,使用ip地址不需要互联网连接。局域网中的每台计算机都有一个内部IP地址,您可以通过运行

ipconfig /all
在cmd中

您可以使用服务器的ip地址(可能是192.168.0.x或10.0.0.x)远程访问网站

如果您找到了ip,但仍然无法访问该网站,这意味着WAMP没有配置为响应该名称您叫我什么?192.168.0.3? 那不是我的名字。我是Localhost,您必须修改……/apache/config/httpd.conf

Listen *:80
您必须编辑httpd.conf并找到这一行:listen127.0.0.1:80

然后写下您为LAN设置的所需IP。不要使用自动IP。 e、 g:听192.168.137.1:80


我使用192.167.137.1作为Windows7的局域网IP。重新启动Apache并享受共享。

IP可以是任何LAN或WAN IP地址。但您需要设置防火墙连接以允许它

设备与Web服务器pc的连接可以通过LAN或WAN实现 i、 e通过wifi、连接、临时、有线、mypublic wifi等

您应该遵循以下步骤:

转到控制面板 入站规则>新规则 单击端口>下一步>特定本地端口>输入8080>下一步>允许连接> 下一步>勾选所有域、私有、公共>指定任何名称 现在,您可以通过任何设备(笔记本电脑、手机、台式机等)访问本地主机。 在浏览器url中输入ip地址为123.23.xx.xx:8080,以通过任何设备访问本地主机。 此IP将属于具有web服务器的设备。

在您的电脑连接到其他电脑后,请使用以下4个步骤: 4个步骤: 1-编辑此文件:httpd.conf 为此,单击wamp服务器并选择Apache,然后选择httpd.conf 2-查找此文本:全部拒绝 在下面的标签中:

  <Directory "c:/wamp/www"><!-- maybe other url-->

    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # 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
</Directory>
3-更改为:从无拒绝 像这样:

<Directory "c:/wamp/www">

    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
#    Require all granted
#   onlineoffline tag - don't remove
     Order Deny,Allow
    Deny from none
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
4-重新启动Apache
不要忘记重新启动Apache或所有服务

局域网上的计算机仍然有IP地址,而互联网与此没有任何关系。除非你用的是交叉电缆什么的。我们需要更多的细节来回答你的问题。