目标:配置新安装的apache/2.4.33 版本,实现局域网访问局域网apache服务器的网站
第一步:关闭服务器的防火墙,360等杀毒软件,其实不用退出;
第二步:修改httpd.conf文件,
#
# 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 +Multiviews
#
# 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 local //删除此句
Require all granted //添加此句,不要放这个注释
第二步:修改httpd-vhosts.conf文件
ServerName localhost
ServerAlias localhost
DocumentRoot "$/www"
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all //添加此句,不要放这个注释
Require all granted //添加此句,不要放这个注释
保存修改,重启apache,局域网就可以访问了。
领取专属 10元无门槛券
私享最新 技术干货