Ubuntu安装Apache 2.4.7常见问题解答

环境:Apache 2.4.7 on Ubuntu 14.04

启动apache服务报错:Unknown Authz provider: ip

进入mod模块目录
cd /etc/apache2/mods-available
执行以下命令加载该模块
a2enmod authz_host.load

启动apache服务报错:Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration

加载该模块
a2enmod authz_core.load

启动ssl模块

a2enmod ssl

启用白名单,限制仅允许192.168.1.1的IP访问web相关服务

<Directory /var/www/>
       Options  FollowSymLinks
       AllowOverride None
       Require all denied
       Require ip 192.168.1.1
</Directory>

运行 apt-get update命令后出现错误:The package lists or status file could not be parsed or opened

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update

 

posted @ 2019-05-28 11:35  也曾少年  阅读(704)  评论(0编辑  收藏  举报