Linux:apache优化(4)—— 隐藏版本号

运行环境

复制代码
yum -y install apr apr-devel cyrus-sasl-devel expat-devel libdb-devel openldap-devel apr-util-devel apr-util pcre-devel pcre gcc make zlib-devel 

源码包配置

复制代码
./configure --prefix=/usr/local/httpd --enable-cgi --enable-rewrite --enable-so  --enable-deflate --enable-expires  

编译安装

复制代码
make && make install

主配置文件

复制代码
vi /usr/local/httpd/conf/extra/httpd-default.conf

修改文件中的内容

ServerTokens Prod   		##显示最少的信息,默认是Full显示完整信息
ServerSignature Off   		##生成页面的页脚

sed  "/httpd-default.conf/s/#//" /usr/local/httpd/conf/httpd.conf

/usr/local/httpd/bin/apachectl restart

成功隐藏版本号

相关推荐
阿拉斯加大闸蟹25 分钟前
基于RDMA 通信的可负载均衡高性能服务架构
运维·架构·负载均衡
Darkwanderor29 分钟前
Linux 的权限详解
linux
SabreWulf20201 小时前
Ubuntu 20.04手动安装.NET 8 SDK
linux·ubuntu·avalonia·.net8
不是吧这都有重名1 小时前
为什么ubuntu大文件拷贝会先快后慢?
linux·运维·ubuntu
sunshine-sm1 小时前
CentOS Steam 9安装 Redis
linux·运维·服务器·redis·centos
小熊h2 小时前
MySQL集群高可用架构——组复制 (MGR)
linux·数据库·mysql
棒棒的唐2 小时前
armbian平台ubuntu环境下telnet安装及启动,给pantherX2增加一个应急通道
linux·运维·armbian·telnetd
bug攻城狮2 小时前
CentOS 7 设置静态 IP 地址
linux·tcp/ip·centos
纳切威2 小时前
CentOS 7部署Zabbix5.0
linux·运维·centos·zabbix
sunshine-sm2 小时前
CentOS Steam 9安装 MySQL 8
linux·运维·服务器·数据库·mysql·centos·centos stream