熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> MySQL >> 正文

OPENBSD-3.8上快速部署apache+mysql+php+ssl[3]

2013-11-23 21:09:04  來源: MySQL 


     安裝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>

[]  []  []  


From:http://tw.wingwit.com/Article/program/MySQL/201311/29661.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.