如何让本地网络用户访问我的网站WAMP? [英] How to enable local network users to access my WAMP sites?

查看:186
本文介绍了如何让本地网络用户访问我的网站WAMP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我读到这个话题至少有20篇文章,而他们没有一个人能匹配的情况下,我搞砸了这个过程多次。于是我通过提供我的具体情况下,如果任何帮助将AP preciated转帮助。

First of all, I read at least 20 articles about this topic, and not one of them can match up the scenario and I screwed up the process numerous times. So I turn help by offering my specific scenario if any help will be appreciated.

笔记本电脑或其他设备通过无线路由器相连接。

Laptops or other devices are connected through a wireless router.

我试过:


  • 在防火墙启用端口80。什么都没有发生。

  • 运行 IPCONFIG 并试图IPv4地址存在,拒绝访问或让我给Verizon(我的ISP) ,路由器配置页面。

  • 试过配置Apache的,得一塌糊涂,从来没有得到所有的授权设置在众多的职位,并试图有前途的,坠毁我WAMP之一,已通过所有的辛苦都并重新安装。

  • Enable Port 80 on firewall. nothing happened.
  • Run ping, ipconfig and tried IPv4 address there, denied access or bring me to verizon (my ISP), router config page.
  • Tried config Apache, was a mess, never get all the authorization setup in numerous posts and tried one of promising one, which crashed my WAMP, have to went through all the trouble and reinstall.

我真正想做到真的是简单地让所有用户连接到无线路由器能够存取权限我Win8的托管WAMP的网站。

What I really tried to accomplish is really simply allow all users connect to that wireless router be able to acces my Win8 hosted WAMP sites.

我不知道如果有,我可以穿行,使其真正发挥作用的具体步骤?

I wonder if there is any specific steps that I can walk through to make it really work?

在Win8.1 WAMP 2.4。
笔记本电脑主机的本地网站。

WAMP 2.4 on Win8.1. Laptop host local sites.

推荐答案

WAMPServer被设计为单座的开发工具。因此,Apache是​​默认配置为仅允许从PC访问运行的服务器,即本地主机或127.0.0.1或:: 1。

WAMPServer is designed to be a single seat developers tool. Apache is therefore configure by default to only allow access from the PC running the server i.e. localhost or 127.0.0.1 or ::1

但是,因为它是Apache的完整版本的所有你需要的是您正在使用的服务器的小知识。

But as it is a full version of Apache all you need is a little knowledge of the server you are using.

简单(锤子敲碎坚果)的方法是使用'放上网wampmanager菜单选项。

The simple ( hammer to crack a nut ) way is to use the 'Put Online' wampmanager menu option.

left click wampmanager icon -> Put Online

然而,这告诉Apache它的接受宇宙中的任何IP地址的连接的。只要你有没有端口转发80端口在路由器上,或者永远不会将尝试在未来,这不是一个问题。

This however tells Apache it can accept connections from any ip address in the universe. That's not a problem as long as you have not port forwarded port 80 on your router, or never ever will attempt to in the future.

更明智的方法是编辑httpd.conf文件(再次使用wampmanager菜单的)并手动修改Apache的访问安全。

The more sensible way is to edit the httpd.conf file ( again using the wampmanager menu's ) and change the Apache access security manually.

left click wampmanager icon -> Apache -> httpd.conf

这将启动记事本httpd.conf文件。

This launches the httpd.conf file in notepad.

查找该文件的这一部分。

Look for this section of this file

<Directory "d:/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 all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>

现在假设你的本地子网中使用的地址范围192.168.0。

Now assuming your local network subnet uses the address range 192.168.0.?

添加此行后,从本地主机允许

Allow from 192.168.0

这会告诉阿帕奇它允许从该子网的IP地址进行访问。
当然,你需要检查你的路由器设置为使用192.168.0范围。

This will tell Apache that it is allowed to be accessed from any ip address on that subnet. Of course you will need to check that your router is set to use the 192.168.0 range.

这是简单地通过在命令窗口输入以下命令来完成 IPCONFIG ,看着标有一行 IPv4地址。你然后使用你在那里看到地址的前3个部分。

This is simply done by entering this command from a command window ipconfig and looking at the line labeled IPv4 Address. you then use the first 3 sections of the address you see in there.

例如,如果你是这样的: -

For example if yours looked like this:-

IPv4 Address. . . . . . . . . . . : 192.168.2.11

您将使用

Allow from 192.168.2

更新为Apache 2.4用户

当然,如果你使用的是Apache 2.4本的语法已经改变了。

Of course if you are using Apache 2.4 the syntax for this has changed.

您应该取代所有本节:

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost

通过这一点,使用新的Apache 2.4语法

With this, using the new Apache 2.4 syntax

Require local
Require ip 192.168.0

您不应该只是添加此成的httpd.conf 它必须是一个替代。

You should not just add this into httpd.conf it must be a replace.

这篇关于如何让本地网络用户访问我的网站WAMP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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