[APACHE]服务器配置实现局域网其他电脑可访问
Posted wesen
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[APACHE]服务器配置实现局域网其他电脑可访问相关的知识,希望对你有一定的参考价值。
目标:配置新安装的apache/2.4.33 版本,实现局域网访问局域网apache服务器的网站
第一步:关闭服务器的防火墙,360等杀毒软件,其实不用退出;
第二步:修改httpd.conf文件,
<Directory "${INSTALL_DIR}/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
# 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 //添加此句,不要放这个注释
</Directory>
第二步:修改httpd-vhosts.conf文件
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all //添加此句,不要放这个注释
Require all granted //添加此句,不要放这个注释
</Directory>
</VirtualHost>
保存修改,重启apache,局域网就可以访问了。
以上是关于[APACHE]服务器配置实现局域网其他电脑可访问的主要内容,如果未能解决你的问题,请参考以下文章
如何配置 Apache localhost 服务器以从其他计算机访问它
在LINUX UBUNTU下用LAMP搭建的服务环境可以支持局域网内或者不是局域网内其他电脑登陆查看吗?