安泰信息

2008年11月18日

Optimal mod_jk configuration

归档在: Linux, apache, jboss — JACKEYJ @ 9:03 AM

Optimal mod_jk configuration

 

There are many potential problems associated with the default configuration of mod_jk.  Let’s say it is perfectly adequate for a very low traffic website, but when pushing any moderate to high load to mod_jk, there will be connection problems.  This is not due to any bug in mod_jk whatsoever, however, it is because the default configuration makes no assumption about your existing hardware or potential load, so, therefore, it is not tuned accordingly.

 

Note that the configuration recommendations here are optimal as a base configuration to avoid many of the common problems users experience with mod_jk. There exist many other useful optimizations, but these depend on the environment and web application in use. See http://tomcat.apache.org/connectors-doc/reference/workers.html for details on all available mod_jk properties.

 

Let’s take a look at a typical default configuration for Apache/Tomcat/mod_jk:
workers.properties

worker.list=loadbalancer,status

worker.node1.port=8009
worker.node1.host=node1.mydomain.com
worker.node1.type=ajp13
worker.node1.lbfactor=1

worker.node2.port=8009
worker.node2.host= node2.mydomain.com
worker.node2.type=ajp13
worker.node2.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2

worker.status.type=status

 
JBoss Web’s (Tomcat) server.xml AJP snippet:

<Connector port=”8009″ address=”${jboss.bind.address}” protocol=”AJP/1.3″
         emptySessionPath=”true” enableLookups=”false” redirectPort=”8443″ ></Connector>

 
Apache’s httpd.conf:

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

 

 

The above configuration, under load, may cause mod_jk to be very slow and unresponsive, cause http errors, and cause half-closed connections.   These problems can arise because there are no connection timeouts specified to take care of orphaned connections, no error handling properties defined in workers.properties, and no connection limits set in Apache and Tomcat.

 

 

First off, lets take care of Tomcat:

 
Configuring server.xml:

 

The main concern with server.xml is setting the connectionTimeout which

sets the SO_TIMEOUT of the underlying socket.  So when a connection in

Tomcat hasn’t had a request in the amount of time specified by

connectionTimeout, then the connection dies off.  This is necessary because if the connection hasn’t been used for a certain period of

time then there is the chance that it is half-close on the mod_jk end.

If the connection isn’t closed there will be an inflation of threads

which can over time hit the maxThreads count in Tomcat then Tomcat will

not be able to accept any new connections.  A connectionTimeout of 600000 (10 minutes) is a good number to start out with.  There may be a situation where the connections are not being recycled fast enough, in this instance the connectionTimeout could be lowered to 60000 or 1 minute.

 

When setting connectionTimeout in Tomcat, mod_jk should also have

connect_timeout/prepost_timeout set, which allows detection that the

Tomcat connection has been closed and preventing a retry request.

 

The recommended value of maxThreads is 200 per CPU, so here we assume the server is a single core machine.  If it has been quad core, we could push that value to 800, and more depending on RAM and other machine specs.

 

<Connector port=”8009″
           address=”${jboss.bind.address}”
           emptySessionPath=”true”
           enableLookups=”false”
           redirectPort=”8443″
           protocol=”AJP/1.3″
           maxThreads=”200″
           connectionTimeout=”600000″></Connector>

 

 

 

 
Configuring workers.properties:

 

See comments inline.

 

worker.list=loadbalancer,status

worker.template.port=8009
worker.template.type=ajp13
worker.template.lbfactor=1
worker.template.ping_timeout=1000
#ping_mode was introduced in 1.2.27, if not using 1.2.27 please specify connect_timeout=10000 and prepost_timeout=10000 as an alternative

worker.template.ping_mode=A
worker.template.socket_timeout=10
#It is not necessary to specify connection_pool_timeout if you are running the worker mpm
worker.connection_pool_timeout=600

#Referencing the template worker properties makes the workers.properties shorter and more concise
worker.node1.reference=worker.template
worker.node1.host=192.168.1.2

worker.node2.reference=worker.template
worker.node2.host=192.168.1.3

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2

worker.status.type=status

 

The key points in the above workers.properties is we’ve added limits for the connections mod_jk makes.  With the base configuration, socket timeouts default to infinite. The other important properties are ping_mode and ping_timeout which handle probing a connection for errors and connection_pool_timeout which must be set to equal server.xml’s connectionTimeout when using the prefork mpm.  When these two values are the same, after a connection has been inactive for x amount of time, the connection in mod_jk and Tomcat will be closed at the same time, preventing a half-closed connection.

 

 

 
Configuring Apache

 

Make note that maxThreads for the AJP connection should coincide with

the MaxClients set in Apache’s httpd.conf.  MaxClients needs to be set

in the correct module in Apache.

 

 

This can be determined by running httpd -V:

 

# httpd -V

Server version: Apache/2.2.3
Server built:   Sep 11 2006 09:43:05
Server’s Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.8
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with….
-D APACHE_MPM_DIR=”server/mpm/prefork”
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=”/etc/httpd”
-D SUEXEC_BIN=”/usr/sbin/suexec”
-D DEFAULT_PIDLOG=”logs/httpd.pid”
-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”
-D DEFAULT_LOCKFILE=”logs/accept.lock”
-D DEFAULT_ERRORLOG=”logs/error_log”
-D AP_TYPES_CONFIG_FILE=”conf/mime.types”
-D SERVER_CONFIG_FILE=”conf/httpd.conf”

 

Which tells me the Server MPM is Prefork.  This is not always 100% accurate so you should also view the output of /etc/sysconfig/httpd to see if the following line is there: HTTPD=/usr/sbin/httpd.worker.  If it is commented out you are running prefork, otherwise if uncommented worker.

 

httpd.conf:

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
MaxClients       200
MaxRequestsPerChild  0
</IfModule>

 

Or if Apache is using worker, it is
<IfModule worker.c>
StartServers         2
MaxClients         200
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

 

MaxRequestsPerChild is 0, this is the recommended value when using

mod_jk as mod_jk keeps open persistent connections.  The key values in

the above configuration are MaxClients and MaxRequestsPerChild, the rest

of the values are left as default.  Note that MaxRequestsPerChild is

recommended to be 0 however the value may need to be greater than 0

depending on if Apache is used for other modules also, especially in the

case of resource leakage.

 

 
Advanced worker-mpm Configuration

 

To get the most out of your mod_jk setup you should be using Apache’s worker mpm which provides a definite performance improvement over the prefork mpm.  The following section will detail how to configure Apache/mod_jk/Tomcat with the worker mpm and the math behind the configuration.

 

Let’s start out with the worker mpm configuration

<IfModule mpm_worker_module>

ThreadLimit 100
StartServers 5
MaxClients 1000
MinSpareThreads 100
MaxSpareThreads 1000
ThreadsPerChild 100
MaxRequestsPerChild 0
</IfModule>

 

The optimal configuration completely depends on the hardware being used and the load requirements.  But a general rule of thumb, keep processes low and thread count high.  To determine the number of processes Apache will use simply divide MaxClients by ThreadPerChild.  So in this case MaxClients (1000) / ThreadsPerChild (100) = Processes (10), so Apache will allocate a maximum of 100 threads per each 10 child processes resulting in a total of 1000 possible clients.

 

Now to translate this to mod_jk, mod_jk maintains a connection pool for each worker defined in workers.properties.  By default with Apache mod_jk sets connection_pool_size to ThreadsPerChild, so in the above case that would translate to 100, giving 1000 possible connections to JBoss.  This may or may not be desired.

 

Let’s take a common example, there will be 3 JBoss servers that combined needed to be able to handle 900 concurrent connections

 

worker.list=loadbalancer,status
 

worker.template.type=ajp13
worker.template.port=8009
worker.template.ping_mode=A
worker.template.connection_pool_size=30
worker.template.socket_timeout=10
worker.template.retries=20
 

worker.node1.reference=worker.template
worker.node1.host=192.168.0.101

worker.node2.reference=worker.template
worker.node2.host=192.168.0.102

worker.node3.reference=worker.template
worker.node3.host=192.168.0.103
 

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2, node3
worker.sticky_session=True

worker.status.type=status

 

The above configuration tells mod_jk to multiplex 30 connections to the available Apache processes, which is 10 processes.  So that means 30 connections multiplexed over 10 processes gives 300 possible connections to each backend worker.  Furthermore, the total connections able to be used in this configuration from Apache is 900 which means  100 connections will be left over for static content or whatnot.

 

 

Next configure maxThreads in each ajp connector to match the above.

 

Node 1 ajp connector:

<Connector port=”8009″
           address=”${jboss.bind.address}”
           emptySessionPath=”true”
           enableLookups=”false”
           redirectPort=”8443″
           protocol=”AJP/1.3″
           maxThreads=”300″
           connectionTimeout=”600000″></Connector>

 

Node 2 ajp connector:

<Connector port=”8009″
           address=”${jboss.bind.address}”
           emptySessionPath=”true”
           enableLookups=”false”
           redirectPort=”8443″
           protocol=”AJP/1.3″
           maxThreads=”300″
           connectionTimeout=”600000″></Connector>

 

Node 3 ajp connector:

<Connector port=”8009″
           address=”${jboss.bind.address}”
           emptySessionPath=”true”
           enableLookups=”false”
           redirectPort=”8443″
           protocol=”AJP/1.3″
           maxThreads=”300″
           connectionTimeout=”600000″></Connector>

 

Remember when using connectionTimeout which is always recommended, prepost_timeout and connect_timeout also need to be set, which is done.  I’m not showing sticky session configuration, but that covered in the main mod_jk article in using mod_jk with JBoss.

 reference from :http://www.jboss.org/community/docs/DOC-11543

UsingMod_jk1.2WithAFirewall

归档在: Linux, apache, jboss — JACKEYJ @ 8:38 AM

Setting up mod_jk with a firewall:

 
Configuring workers.properties:

# Define list of workers that will be used
# for mapping requests
# The configuration directives are valid
# for the mod_jk version 1.2.18 and later
#
worker.list=loadbalancer,status

# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
#Using an IP prevents a DNS lookup
worker.node1.host=192.168.1.2
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.connect_timeout=10000
worker.node1.prepost_timeout=10000
worker.node1.socket_keepalive=True

# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=192.168.1.3
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.connect_timeout=10000
worker.node2.prepost_timeout=10000
worker.node2.socket_keepalive=True

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2

# Status worker for managing load balancer
worker.status.type=status

 

 

socket_keepalive=true is the most important setting. connect_timeout and

prepost_timeout are to “work-around” firewalls that

ignore keepalives or close the connection for unknown reasons.

 

 

 
Configuring server.xml:

The main concern with server.xml is setting the connectionTimeout which

sets the SO_TIMEOUT of the underlying socket.  So when a connection in

Tomcat hasn’t had a request in the amount of time specified by

connectionTimeout, then the connection dies off.  Why is this a good

thing?…because if the connection hasn’t been used for a certain period of

time then there is the chance that it is half-close on the mod_jk end.

If the connection isn’t closed there will be an inflation of threads

which can over time hit the maxThreads count in Tomcat then Tomcat will

not be able to accept any new connections.

 

When setting connectionTimeout in Tomcat, mod_jk should also have

connect_timeout/prepost_timeout set, which allows detection that the

Tomcat connection has been closed and preventing a retry request.

 

 

<Connector port=”8009″
           address=”${jboss.bind.address}”
           emptySessionPath=”true”
           enableLookups=”false”
           redirectPort=”8443″
           protocol=”AJP/1.3″
           maxThreads=”200″
           connectionTimeout=”60000″></Connector>

 
Configuring Apache

 

Make note that maxThreads for the AJP connection should coincide with

the MaxClients set in Apache’s httpd.conf.  MaxClients needs to be set

in the correct module in Apache. 

 

 

This can be determined by running httpd -V:

 

# httpd -V

Server version: Apache/2.2.3
Server built:   Sep 11 2006 09:43:05
Server’s Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.8
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with….
-D APACHE_MPM_DIR=”server/mpm/prefork”
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=”/etc/httpd”
-D SUEXEC_BIN=”/usr/sbin/suexec”
-D DEFAULT_PIDLOG=”logs/httpd.pid”
-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”
-D DEFAULT_LOCKFILE=”logs/accept.lock”
-D DEFAULT_ERRORLOG=”logs/error_log”
-D AP_TYPES_CONFIG_FILE=”conf/mime.types”
-D SERVER_CONFIG_FILE=”conf/httpd.conf”

 

Which tells me the Server MPM is Prefork

 

httpd.conf:

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
MaxClients       200
MaxRequestsPerChild  0
</IfModule>

 

Or if Apache is using worker, it is
<IfModule worker.c>
StartServers         2
MaxClients         200
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

 

MaxRequestsPerChild is 0, this is the recommended value when using

mod_jk as mod_jk keeps open persistent connections.  The key values in

the above configuration are MaxClients and MaxRequestsPerChild, the rest

of the values are left as default.  Note that MaxRequestsPerChild is

recommended to be 0 however the value may need to be greater than 0

depending on if Apache is used for other modules also, especially in the

case of resource leakage.

2008年11月11日

redflag linux java中文乱码解决

归档在: 未分类, Linux, java — JACKEYJ @ 8:40 AM

最近运行一个jnlp程序,但中文显示成了方块,gg里面搜罗一下:

解决乱码问题

在redflag desktop6 sp1中可能打开java控制面板乱码,解决办法如下: 拷贝/usr/share/fonts/zh_CN/TrueType(其它版本可参考 /usr/share/fonts/chinese/TrueType)中的ttf文件到 “/zjant.com/jre/lib/fonts/fallback(如 /usr/java/jre1.6.0_06/lib/fonts/fallback)”夹下,如果在“java安装目录/jre/lib/fonts” 下没有 “fallback”这个目录,可以手工创建一个,即可解决。

2008年11月07日

一份婚前协议书

归档在: 胡说八道 — JACKEYJ @ 9:03 AM

 

 

 本协议书旨在为那些深切领会婚姻含义,本着平等、和平、互助等一系列公平原则的即将成为夫妻的人们所设置。

 任 何误解或者认为婚前协议是对婚姻生活的侵害的观点都会被本协议书一一纠正过来,应当认为本协议书是对婚姻家庭生活的一种切实可行的保障,而不是对婚姻生活 的肢解。我们应当充分支持下列观念:个人的利益高于一切;其次就是由这两个个人所构成的(请注意:这是一种亚结构)家庭的共同利益。任何认为以家庭利益高 于一切的观点,可以统治好一个家庭,那么有这种观念的人必定会犯下无法纠正的错误。

 

 

第一章       夫、妻与家庭

 

第一条:夫、妻是婚姻生活的主体,在家庭中,个人的利益高于一切。

 

第二条:夫、 妻任何一方都拥有独立的人身权、政治权,拥有通信、娱乐、交际等一切宪法赋予的权利,任何一方都不是另一方的附属品,任何一方亦不得成为他方的统治者。 夫、妻双方本着平等互利、互不干涉个人事务、互不侵犯、互相尊重对方的主权和人身安全、和平共处、共同繁荣的原则来维系属于夫妻共有的家庭生活。

 

第三条:家 庭是夫、妻双方将互相合作、共谋发展的一个小型的集合体。这个集合体不是为了用来约束夫、妻双方或某一方的自由或权利而设置。这个集合体是为了谋求由合作 可能带来的更多、更大的利益而设置。如果集合体内的分子因进入集合体而并未使自己的生活或利益有所发展,反而有所损害或倒退的话,任何一分子均可以此理由 退出集合体,不论原因是如何产生的。

 

第四条:家庭的稳定,是由夫、妻双方予以维持的,这一种合作关系的平等性是神圣不可侵犯的。如果夫、妻关系不平等,家庭的稳定随即丧失,不复存在。

 

第五条:夫、妻双方对家庭的唯一的责任就是彼此忠诚信任,决不猜忌。任何个人都必须严肃地记住:猜忌对方是婚姻生活的最大的敌人。如果你在某些方面主观地不相信对方,那么签定本协议书即没有必要。

 

第六条:不得因身体差异或经济实力的差异或智力的差异而对另一方有所歧视,夫、妻任何一方不得利用上列条件(比对方优越)做为要挟对方的手段。但相对条件较差的一方亦不得要求对方降低个人优越条件或做变相补偿。

 

第七条:夫、妻在共同生活中应当互相尊重对方的文化传统和习惯,相互影响不得以强迫的方式进行。而一切与文化相关的事物,如宗教、党派、饮食、衣着、学历和爱好均应获得对方的理解,但决不可以强迫对方接受。

 

第八条:夫、妻在共同生活中互助成为一种经常的事情,但本协议书提醒二位:接受对方的帮助决不能把这认为是一种理所当然的事情,而应当视为是自己所欠的一种债务,所有积极的补偿都是对对方帮助的肯定。这种互助才会更有意义和更富于创造性。

 

第九条:夫、妻在共同生活中必须不断发展自我,提高个人能力。这是保障婚姻生活的一种积极的促进作用,任何不思进取的思想,对家庭生活而言是有危害的。但必须记住:强迫对方按照一定的方法进行变革或进步也许危害更加严重。

 

第二章       夫、妻个人财产与家庭共有财产

 

第十条:从严格的意义上讲,一个新建立和家庭是没有财产的,有的只是夫、妻的个人财产,也可以称为家庭原始财产。

 

第十一条:在家庭生活中,夫、妻不应该因为使用家庭财产而发生争执。避免的方法是确定该财产是属于哪一方投资的家庭原始财产,投资方有优先使用权。在双方都想使用时,无投资一方须无条件放弃使用的要求,在拥有资产方不使用时,对方可以使用,直到所有者要求使用时为止。

 

第十二条:家庭原始财产归夫、妻个人所有,谁投资谁拥有的原则贯彻婚姻生活的始终。

 

第十三条:家庭共有财产指家庭生活开始后,由夫妻双方共同购置的财产。这些财产按照夫、妻双方对家庭资金的投入比例,以股份的形式由双方分别拥有。

 

第十四条:家庭的维护和经营必须投入资金。资金的来源主要依靠夫、妻双方的个人收入。其它来源不包括在夫妻个人收入中。(例如:遗产、馈赠)

第十五条:夫、妻双主均有义务将个人收入(主要指固定收入)的60%投入家庭事务中来。夫、妻双方的剩余40%的收入,个人有权随意使用,也可以投入到家庭事务中来(须以自愿为原则,对方不得强迫)。

 

第十六条:夫、妻双方用于家庭建设的资金,由夫、妻双方共同使用于家庭生活中,个人的事务均不得使用共有资金。由共有资金购置的固定资产按当月(数目大的按当年或三年)的夫妻双方的资金比例,以股份形式确定所有权。

 

第十七条:家庭必须设立财会帐目表、资产统计表,按月统计和结算。

 

第十八条:在家庭生活中,购置物品或进行消费,应当双方协商进行,如协商不成,由资金投入多的一方决定,但应当将对方所占资金比例部分,由个人部分资金中承付。

 

第十九条:夫、妻生活中,某共有资产如一方使用较多,而他方几乎不使用,最好由使用一方赎为个人财产。

 

第二十条:家庭生活消费应当分为三部分,即日常生活消费、储蓄和投资。具体细节由夫、妻双方商定。

第二十一条:夫、妻任何一方不得将个人财产或拥有的股份赠予对方,任何一方均不得使用赌博、请求或以其它方法获得对方的财产或资金。夫、妻双方允许将个人资金借贷给对方,对方需用自己的财产或股份作抵押才算有效。任何借贷均应有书面记录和签名。

 

第二十二条:在婚姻生活中或结束后,夫、妻双方的任何一方都自愿放弃做为对方第一顺序继承人的资格,以杜绝任何以婚姻为目的,骗取钱财的阴谋。

2008年11月06日

杭州的扒手越来越多了

归档在: 胡说八道 — JACKEYJ @ 9:18 PM

今天下班,刚走过学院路和天目山路红绿灯,就听到一个mm说小心,从我身边跑过,这时猛然回头,发现一个维族的年轻男子贴在我身边,正准备发作,那个mm说他们有三个人。此时才看清楚那个人面貌,只见他愤愤地用眼睛瞪那个mm。看他们人都始终,就不发作了,再说自己东西还没有被窃。

这突然又让我想起来在9月份的时候,我骑自行车在文三路上,刚过学军中学的公交站,感觉身边不对劲,回头一看发现一个小子,正在拉我的包。当即叫了一声,那人好像也赶紧很突然,怔了一下,然后朝后面走开。

现在杭州的外来人口越来越多,连小偷也见多了。不知道杭州的警察叔叔怎么想。

不过防范扒手的措施大家还是得学习一下:

1.  不要把包包,背在身后,不管是双肩的还是挎包。

2. 骑车子等红绿灯的时候也要小心,在这个时候恰恰是小偷容易得手的时候。

3. 上公交车的身后要小心,不用为了强到一个位子,拼命的往上挤。如果你挤了,就是给小偷一个好机会。这个我以前晚上在火车东站做215的时候遇到过多次,都是一帮小年轻的,等车子到站,他们就在人群中挤动,找机会下手。一次上了车一个mm发现手机不见了。更加猖狂的是,一次有两拨小偷居然在火车东站打斗。

apache openssl 制作ssl证书

归档在: apache — JACKEYJ @ 11:41 AM

在centos 4.1/apache2.2.3/openssl0.98
参考:www.viiving.com

步骤1:生成密钥
命令:openssl genrsa 1024 > server.key
说明:这是用128位rsa算法生成密钥,得到server.key文件

步骤2: 生成证书请求
命令:openssl req -new -key server.key > server.csr
说明:这是用步骤1的密钥生成证书请求文件server.csr, 这一步提很多问题,一一输入

步骤2: 生成证书请求
命令:openssl req -x509 -days 365 -key server.key -in server.csr > server.crt
说明:这是用步骤1,2的的密钥和证书请求生成证书server.crt,-days参数指明证书有效期,单位为天

把得到的server.key和server.crt文件拷贝到apache的对应目录

然后修改httpd.conf和httpd-ssl.conf两个文件中的配置就可以了.
在开发和测试过程中使用还是不错的.

Powered by ZJANT