关键词不能为空

当前您在: 主页 > 英语 >

如何解决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访问问题的相关文章

  • 爱心与尊严的高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊严高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊重的作文题库

    1.作文关爱与尊重议论文 如果说没有爱就没有教育的话,那么离开了尊重同样也谈不上教育。 因为每一位孩子都渴望得到他人的尊重,尤其是教师的尊重。可是在现实生活中,不时会有

    小学作文
  • 爱心责任100字作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任心的作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文