Linux下Appweb编译链接openssl

1、编译openssl

tar –xzvfopenssl-1.0.01.tar.gz

./config --shared

make 编译成动态链接库

make install 其中有libssl.so动态链接库

2、编译Appweb

tar –xzvf appweb-3.4.2.tar.gz

./configure –with-openssl=openssl编译目录/

make

make install

安装完成

 

修改配置文件

appweb.conf

include conf/log.conf
ServerRoot "/etc/appweb"

Listen 80

DocumentRoot "/var/www/"
DirectoryIndex index.html

TypesConfig mime.types
LoadModulePath "/usr/lib/appweb/modules"

SetConnector netConnector



    LoadModule authFilter mod_auth
    AddOutputFilter authFilter




    LoadModule rangeFilter mod_range
    AddOutputFilter rangeFilter


    LoadModule chunkFilter mod_chunk
    AddFilter chunkFilter



Include conf/modules/*



    # PutMethod on
    LoadModule fileHandler mod_file
    AddHandler fileHandler .html .gif .jpeg .png .pdf ""

Group nobody
User nobody


TraceMethod off



Include conf/doc.conf
Include conf/hosts/*
Include conf/apps/*

include conf/tune.conf

其实主要需要修改的地方是上面标绿的地方,Group跟User主要是控制CGI的执行权限,比如说执行系统命令是如果不是root,则无法执行,这时候需要把Group和User修改成root或者具备执行权限的账户


ssl-default.conf


#
#   ssl-default.conf -- SSL Configuration for the default server
#   



    LoadModule sslModule mod_ssl


    #
    #   This virtual host will process SSL requests. Inherits the default server configuration.
    #   List on port 4443 for SSL requests. NOTE: Standard SSL port is 443.
    #
    Listen 443
     
         DocumentRoot "/var/www/"
        SSLEngine on
        SSLProtocol ALL -SSLV2
        SSLCipherSuite HIGH:MEDIUM


        #
        #   Other possible cypher suites
        #   
        # SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL


        #
        #   WARNING: you must generate the server.crt and server.key.pem
        #
         SSLCertificateFile "$SERVER_ROOT/ssl/server.crt"


        #
        #   WARNING: use a decrypted key here so it won't prompt for the password. 
        #   Replace with server.key for higher security.
        #
         SSLCertificateKeyFile "$SERVER_ROOT/ssl/server.key.pem"


        #
        # Add these directives to require and verify client certificates
        #
        # SSLVerifyClient require
         SSLCACertificateFile "$SERVER_ROOT/ssl/ca.crt"
         SSLCACertificatePath "$SERVER_ROOT/ssl/certs"
     
                                 


另外,这个位置也需要修改一下

你可能感兴趣的:(Linux相关)