关键词不能为空

当前您在: 主页 > 英语 >

如何解决wamp中apache外部IP访问问题

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-28 14:08
tags:

-

2021年2月28日发(作者:boer)


解决外部设备通过


IP


地址访问本地

< p>
Apache


服务器



在 本地电脑上安装了


WAMPSERVER2.5


其中包含


Apache


(版本


2.4.9




php


,在电脑上访问


http://localhost


可以进行,在手机上访问< /p>



(自己电脑


IP


地址


)


却发现,直接提示


403


Forbidden


解决方法


:


打开



它的默认路径


:



C:wampbinapacheapache2.4.9conf

< br>注意:


打开之后,


最好用一些编辑器打开,


用记事本打开几乎不是人


能看的


< br>打开之后在


Directory


下修改

< br>







AllowOverride all






Require all granted



添加以上信息,或者查找


AllowOverride


Require


将其都改为


all




all granted


,亲测有效,要是懒得修改,直接拷贝复制以下信息吧



#


# This is the main Apache HTTP server configuration file. It contains the


# configuration directives that give the server its instructions.


# See for detailed information.


# In particular, see


#


# for a discussion of each configuration directive.


#


# Do NOT simply read the instructions in here without understanding


# what they do. They're here only as hints or reminders. If you are unsure


# consult the online docs. You have been warned.


#


# Configuration and logfile names: If the filenames you specify for many


# of the server's control files begin with


# server will use that explicit path. If the filenames do *not* begin


# with


# with ServerRoot set to


# server as


# will be interpreted as '/logs/access_log'.


#


# NOTE: Where filenames are specified, you must use forward slashes


# instead of backslashes (e.g.,


# If a drive letter is omitted, the drive on which is located


# will be used by default. It is recommended that you always supply


# an explicit drive letter in absolute paths to avoid confusion.


ServerSignature


On


ServerTokens


Full



#


# ServerRoot: The top of the directory tree under which the server's


# configuration, error, and log files are kept.


#


# Do not add a slash at the end of the directory path. If you point


# ServerRoot at a non-local disk, be sure to specify a local disk on the


# Mutex directive, if file-based mutexes are used. If you wish to share the


# same ServerRoot for multiple httpd daemons, you will need to change at


# least PidFile.


#


ServerRoot




Define


APACHE24 Apache2.4



#


# Mutex: Allows you to set the mutex mechanism and mutex file directory


# for individual mutexes, or change the global defaults


#


# Uncomment and change the directory if mutexes are file-based and the default


# mutex file directory is not on a local disk or is not appropriate for some


# other reason.


#


# Mutex default:logs



#


# Listen: Allows you to bind Apache to specific IP addresses and/or


# ports, instead of the default. See also the


# directive.


#


# Change this to Listen on specific IP addresses as shown below to


# prevent Apache from glomming onto all bound IP addresses.


#


#Listen 12.34.56.78:80


Listen


0.0.0.0:80


Listen


[::0]:80



#


# Dynamic Shared Object (DSO) Support


#


# To be able to use the functionality of a module which was built as a DSO you


# have to place corresponding `LoadModule' lines at this location so the


# directives contained in it are actually available _before_ they are used.


# Statically compiled modules (those listed by `httpd -l') do not need


# to be loaded here.


#


# Example:


# LoadModule foo_module modules/mod_


#


LoadModule


access_compat_module modules/mod_access_


LoadModule


actions_module modules/mod_


LoadModule


alias_module modules/mod_


LoadModule


allowmethods_module modules/mod_


LoadModule


asis_module modules/mod_


LoadModule


auth_basic_module modules/mod_auth_


#LoadModule auth_digest_module modules/mod_auth_


#LoadModule authn_anon_module modules/mod_authn_


LoadModule


authn_core_module modules/mod_authn_


#LoadModule authn_dbd_module modules/mod_authn_


#LoadModule authn_dbm_module modules/mod_authn_


LoadModule


authn_file_module modules/mod_authn_


#LoadModule authn_socache_module modules/mod_authn_


#LoadModule authnz_ldap_module modules/mod_authnz_


LoadModule


authz_core_module modules/mod_authz_


#LoadModule authz_dbd_module modules/mod_authz_


#LoadModule authz_dbm_module modules/mod_authz_


LoadModule


authz_groupfile_module modules/mod_authz_


LoadModule


authz_host_module modules/mod_authz_


#LoadModule authz_owner_module modules/mod_authz_


LoadModule


authz_user_module modules/mod_authz_


LoadModule


autoindex_module modules/mod_


#LoadModule buffer_module modules/mod_


LoadModule


cache_module modules/mod_


LoadModule


cache_disk_module modules/mod_cache_


#LoadModule cern_meta_module modules/mod_cern_


LoadModule


cgi_module modules/mod_


#LoadModule charset_lite_module modules/mod_charset_


#LoadModule data_module modules/mod_


#LoadModule dav_module modules/mod_


#LoadModule dav_fs_module modules/mod_dav_


#LoadModule dav_lock_module modules/mod_dav_


#LoadModule dbd_module modules/mod_


LoadModule


deflate_module modules/mod_


LoadModule


dir_module modules/mod_


#LoadModule dumpio_module modules/mod_


LoadModule


env_module modules/mod_


#LoadModule expires_module modules/mod_


#LoadModule ext_filter_module modules/mod_ext_


LoadModule


file_cache_module modules/mod_file_


#LoadModule filter_module modules/mod_


#LoadModule headers_module modules/mod_


#LoadModule heartbeat_module modules/mod_


#LoadModule heartmonitor_module modules/mod_


#LoadModule ident_module modules/mod_


#LoadModule imagemap_module modules/mod_


LoadModule


include_module modules/mod_


#LoadModule info_module modules/mod_


LoadModule


isapi_module modules/mod_


#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_


#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_


#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_


#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_


#LoadModule ldap_module modules/mod_


#LoadModule logio_module modules/mod_


LoadModule


log_config_module modules/mod_log_


#LoadModule log_debug_module modules/mod_log_


#LoadModule log_forensic_module modules/mod_log_


#LoadModule lua_module modules/mod_


LoadModule


mime_module modules/mod_


#LoadModule mime_magic_module modules/mod_mime_


LoadModule


negotiation_module modules/mod_


#LoadModule proxy_module modules/mod_


#LoadModule proxy_ajp_module modules/mod_proxy_


#LoadModule proxy_balancer_module modules/mod_proxy_


#LoadModule proxy_connect_module modules/mod_proxy_


#LoadModule proxy_express_module modules/mod_proxy_


#LoadModule proxy_fcgi_module modules/mod_proxy_


#LoadModule proxy_ftp_module modules/mod_proxy_


#LoadModule proxy_html_module modules/mod_proxy_


#LoadModule proxy_http_module modules/mod_proxy_


#LoadModule proxy_scgi_module modules/mod_proxy_


#LoadModule ratelimit_module modules/mod_


#LoadModule reflector_module modules/mod_


#LoadModule remoteip_module modules/mod_


#LoadModule request_module modules/mod_


#LoadModule reqtimeout_module modules/mod_


#LoadModule rewrite_module modules/mod_


#LoadModule sed_module modules/mod_


#LoadModule session_module modules/mod_


#LoadModule session_cookie_module modules/mod_session_


#LoadModule session_crypto_module modules/mod_session_


#LoadModule session_dbd_module modules/mod_session_


LoadModule


setenvif_module modules/mod_


#LoadModule slotmem_plain_module modules/mod_slotmem_


#LoadModule slotmem_shm_module modules/mod_slotmem_


#LoadModule socache_dbm_module modules/mod_socache_


#LoadModule socache_memcache_module modules/mod_socache_


#LoadModule socache_shmcb_module modules/mod_socache_


#LoadModule speling_module modules/mod_


#LoadModule ssl_module modules/mod_


#LoadModule status_module modules/mod_


#LoadModule substitute_module modules/mod_


#LoadModule unique_id_module modules/mod_unique_


#LoadModule userdir_module modules/mod_


#LoadModule usertrack_module modules/mod_


#LoadModule version_module modules/mod_


LoadModule


vhost_alias_module modules/mod_vhost_


#LoadModule watchdog_module modules/mod_


#LoadModule xml2enc_module modules/mod_



LoadModule


php5_module


#PHPIniDir c:/wamp/bin/php/php5.5.12




unixd_module>


#


# If you wish httpd to run as a different user or group, you must run


# httpd as root initially and it will switch.


#


# User/Group: The name (or #number) of the user/group to run httpd as.


# It is usually good practice to create a dedicated user and group for


# running httpd, as with most system services.


#


User


daemon


Group


daemon





# 'Main' server configuration


#


# The directives in this section set up the values used by the 'main'


# server, which responds to any requests that aren't handled by a


# definition. These values also provide defaults for


# any containers you may define later in the file.


#


# All of these directives may appear inside containers,


# in which case these default settings will be overridden for the


# virtual host being defined.


#



#


# ServerAdmin: Your address, where problems with the server should be


# e-mailed. This address appears on some server-generated pages, such


# as error documents. e.g. admin@


#


ServerAdmin


admin@



#


# ServerName gives the name and port that the server uses to identify itself.


# This can often be determined automatically, but we recommend you specify


# it explicitly to prevent problems during startup.


#


# If your host doesn't have a registered DNS name, enter its IP address here.


#


ServerName


localhost:80



HostnameLookups


Off



#


# DocumentRoot: The directory out of which you will serve your


# documents. By default, all requests are taken from this directory, but


# symbolic links and aliases may be used to point to other locations.


#


DocumentRoot




#


# Each directory to which Apache has access can be configured with respect


# to which services and features are allowed and/or disabled in that


# directory (and its subdirectories).


#


# First, we configure the


# features.


#



/>


AllowOverride


all


Require


all granted




#


# Note that from this point forward you must specifically allow


# particular features to be enabled - so if something's not working as


# you might expect, make sure that you have specifically enabled it


# below.


#





#


# Possible values for the Options directive are


# or any combination of:


# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews


#


# Note that


# doesn't give it to you.


#


# The Options directive is both complicated and important. Please see


# /docs/2.4/mod/#options


# for more information.


#


Options


Indexes FollowSymLinks ExecCGI



#


# AllowOverride controls what directives may be placed in .htaccess files.


# It can be


# AllowOverride FileInfo AuthConfig Limit


#


AllowOverride


all



#


Allow


from all # Controls who can get stuff from this server.


#

-


-


-


-


-


-


-


-



本文更新与2021-02-28 14:08,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/681683.html

如何解决wamp中apache外部IP访问问题的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文