-
解决外部设备通过
IP
地址访问本地
Apache
服务器
在
本地电脑上安装了
WAMPSERVER2.5
其中包含
Apache
(版本
2.4.9
)
和
php
,在电脑上访问
http://localhost
可以进行,在手机上访问<
/p>
(自己电脑
IP
地址
)
却发现,直接提示
403
Forbidden
解决方法
:
p>
打开
它的默认路径
:
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
# 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
#
# any
#
# All of these
directives may appear inside
# 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.
#
-
-
-
-
-
-
-
-
-
上一篇:策划书之手游策划面试技巧
下一篇:游戏公司策划面试笔试题