標籤:pre htm down configure off cgi sys tee sysconf
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 ProdServerSignature OffRewriteEngine onRewriteCond {REQUEST_METHOD} ^(TRACE|TRACK)RewriteRule .* - [F]RequestHeader unset Proxy early
編譯安裝 http