zoukankan      html  css  js  c++  java
  • 编译安装 http

    1. 安装 apr

      http服务依赖 apr和apr-util ,安装 http 前需先安装这两个程序

      apr 简介:http://www.cnblogs.com/Alight/p/3997777.html

      下载:http://apr.apache.org/download.cgi

      apr-1.5.2.tar.gz

      > tar xvf apr-1.5.2.tar.gz

      > cd apr-1.5.2

      > ./configure --prefix=/usr/local/apr-util

      > make && make install

      apr-util-1.5.4.tar.gz

      > tar xvf apr-util-1.5.4.tar.gz

      > cd apr-util-1.5.4
      >
    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

      > make && make install

    2. 安装 http

      下载: http://httpd.apache.org/

      httpd-2.4.25.tar.gz

      > tar xvf httpd-2.4.25.tar.gz

      > cd httpd-2.4.25

      > ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/

      > make && make install

    3. 查看版本

      > httpd -v  

     4. http 安全优化

      在 http 配置文件 httpd.conf 添加如下内容

    ServerTokens Prod
    ServerSignature Off
    
    RewriteEngine on
    RewriteCond {REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    RequestHeader unset Proxy early
    

      

  • 相关阅读:
    21.09.12模拟 P2809 hzwer 爱折纸
    21.09.13模拟 保存名画
    21.09.13模拟赛 魔法传输
    21.09.13模拟 分割金币
    21.09.13模拟 友谊值
    21.09.10模拟 朗格拉日计数
    21.09.10模拟 雷神领域
    P4551 最长异或路径
    P2894 [USACO08FEB]Hotel G
    NOIP复习(总结套路)
  • 原文地址:https://www.cnblogs.com/yorkyang/p/6514010.html
Copyright © 2011-2022 走看看