访问wamp(作为Web服务器)//全局使用Apache 2.4// [英] Access wamp (as web server) // Apache 2.4 // globally

查看:80
本文介绍了访问wamp(作为Web服务器)//全局使用Apache 2.4//的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的wamp64服务器网页不仅可以从本地网络访问,而且可以全局访问.

I want my wamp64 server webpages to can be access globally and not only from my local network.

<Directory />
    AllowOverride none
    Require all granted
</Directory>

<Directory "C:/wamp64/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.
    #

#   onlineoffline tag - don't remove
   Order allow,deny
   Allow from all 
   Require all granted
</Directory>

现在,如果我尝试从手机访问它,则显示空白页面.如果我输入网址/folder_name

Now, if i try to access it from my mobile, there showing an empty (white) page. Same if i put at the url /folder_name

此处的Apache文件代码: http://pastebin.com/A7xxiQ6B

Apache file code here: http://pastebin.com/A7xxiQ6B

推荐答案

以下内容对我有用.找出来:)

Well, the followings working for me. Figure it out :)

只需添加到C:\ Windows \ System32 \ drivers \ etc \ hosts

# localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost <--  Uncomment this
#   ::1             localhost
    127.0.0.1 xxxxxx.ddns.net <-- Add here your public IP or your Dynamic DNS name

如果您的 httpd.conf 如下所示

#Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen [::0]:80

ServerName xxxxx.ddns.net:80

<Directory "C:/wamp64/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.
    #

#   onlineoffline tag - don't remove
   Require all granted
</Directory>

C:\ wamp64 \ alias \ phpmyadmin.conf

<Directory "C:/wamp64/apps/phpmyadmin4.5.2/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require all granted
      ..............
</Directory>

您也可以(可能)在线看到您的沼泽.

You will be able (probably) too see your wamp online.

请注意,您必须为每个项目(www/folder_name)从 localhost \ add_vhost.php 配置虚拟主机,并更改 C:\ wamp64 \ index.php >来自

Please note you have to configure your vhosts from localhost\add_vhost.php for your every project (www/folder_name) and change the C:\wamp64\index.php from

$suppress_localhost = true;

$suppress_localhost = false;

这篇关于访问wamp(作为Web服务器)//全局使用Apache 2.4//的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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