首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

服务器配置实现局域网其他电脑可访问

目标:配置新安装的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,局域网就可以访问了。

  • 发表于:
  • 原文链接http://kuaibao.qq.com/s/20180420G1L26C00?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券