安装mod_limitipconn模块来限制单IP的并发连接数
# wget http://dominiaorg/djao/limit/mod_limitipconntargz
# tar xzf mod_limitipconntargz
# cd mod_limitipconn
# vi Makefile
APXS = /usr/sbin/apxs
# make
# make install
让APACHE支持这个模块
# vi /var/www/conf/httpdconf
<IfModule mod_limitipconnc>
<Location />
MaxConnPerIP
</Location>
</IfModule>
到次整个安装过程结束
附件部分
我们为让APACHE支持SSL传输配置APACHE:
# vi /var/www/conf/httpdconf
添加下面两行
SSLCertificateFile /etc/ssl/servercrt
SSLCertificateKeyFile /etc/ssl/private/serverkey
为了使APACHE启动时启用SSL设置一下APACHE启动选项
# vi /etc/rcconflocal
改
httpd_flags= # or it could have httpd_flags=NO
为
httpd_flags=DSSL # or it could have httpd_flags=NO
手动启动和关闭APACHE这样做就可以了
# apachectl startssl
# apachectl stop
下面是设置APACHE+SSL的过程
创建服务器KEY文件 ( bit) :
# /usr/sbin/openssl genrsa out /etc/ssl/private/serverkey
创建服务器CSR文件(certificate signing request)
# /usr/sbin/openssl req new key /etc/ssl/private/serverkey out /etc/ssl/private/servercsr
这里自己填写一些注册信息
生成签名证书(天有效证书)
# /usr/sbin/openssl x req days in /etc/ssl/private/servercsr signkey /etc/ssl/private/serverkey out /etc/ssl/servercrt
虚拟主机部分
NameVirtualHost :*
<VirtualHost :>
ServerAdmin llzqq@com
DocumentRoot /var/www/llzqq
ServerName llzqqhomecom
ErrorLog logs/llzqqhomecomerror_log
CustomLog logs/llzqqhomecomaccess_log common
SSLEngine on
SSLCipherSuite ALL:!ADH:RC+RSA:+HIGH:+MEDIUM:+LOW:+SSLv:+EXP
SSLCertificateFile /etc/ssl/virtualsitecomcrt
SSLCertificateKeyFile /etc/ssl/private/serverkey
</VirtualHost>
<VirtualHost :>
ServerAdmin llzgg@com
DocumentRoot /var/www/llzgg
ServerName llzgghomecom
ErrorLog logs/llzgghomecomerror_log
CustomLog logs/llzgghomecomaccess_log common
</VirtualHost>
[] [] []