httpd
安装:
yum install pcre-devel openssl-devel
apr
./configure --prefix=/usr/local/apr
make && make install
apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
httpd
./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=event
httpd -M
stub页面
- reading: 接受请求的链接状态数目
- writing: 请求接受完成,正处于处理请求或发送响应的过程中的连接数
- waiting: 保持链接模式,且处于活动状态的连接数
Httpd配置:
VirtualHost:
<VirtualHost *:80>
ServerName blob.bootstrap.pit
ProxyVia on
#ProxyPreserveHost on
ProxyRequests off
<Proxy *>
Require all granted
</Proxy>
#ProxyPass / http://192.168.8.7:8080/
#ProxyPassReverse / http://192.168.8.7:8080/
ProxyPass /server-status !
ProxyPass /server-info !
ProxyPass / ajp://192.168.8.7:8009/
ProxyPassReverse / ajp://192.168.8.7:8009/
<Location / >
Require all granted
</Location>
</VirtualHost>
Unit文件:
[Unit]
Description=The Apache HTTP ServerName
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=simple
EnvironmentFile=/etc/httpd/httpd.conf
ExecStart=/usr/local/httpd/bin/httpd $OPTIONS -DFOREGROUND
Execstart=/usr/local/httpd/bin/httpd -k start -DFOREGROUND
ExecReload=/usr/local/httpd/bin/httpd $OPTIONS -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
PrivateTmp=true
[Install]
WantedBy=multi-user.target