访问wamp(作为Web服务器)//全局使用Apache 2.4//

编程入门 行业动态 更新时间:2024-10-14 02:25:02
本文介绍了访问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 # httpd.apache/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文件代码: pastebin/A7xxiQ6B

Apache file code here: pastebin/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 <-- 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: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 # httpd.apache/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//

本文发布于:2023-11-01 13:19:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549430.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:全局   服务器   Web   wamp   Apache

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!