自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

技術(shù)分享:Ubuntu8.10Server中Apache+SVN+SSL配置方法揭秘

開發(fā) 項目管理
本文主要介紹一下Ubuntu8.10Server中Apache+SVN+SSL配置問題,主要包括SSL配置及個人的一個小小的總結(jié),希望本文能夠是你的視野更加開闊。

本節(jié)接著上節(jié)介紹Ubuntu8.10Server中Apache+SVN+SSL配置問題,在學(xué)習(xí)SVN的過程中,隨著SVN的廣泛應(yīng)用,難免會遇到SVN在多種操作系統(tǒng)中的配置問題,本節(jié)就和大家一起學(xué)習(xí)一下Ubuntu8.10Server中Apache+SVN+SSL配置,希望通過本文你能學(xué)到更多有關(guān)SVN方面的知識。下面是具體介紹。

四、SSL配置
首先我們來看一下Apache+SVN+SSL配置中SSl的配置。這里可以參考:http://www.cnblogs.com/passos/archive/2006/02/18/332992.html
關(guān)于SSL的配置很多,這里我根據(jù)實際情況,做了一個簡單實用的SSL加密機制。方法如下:
Apache2在Ubuntu系統(tǒng)內(nèi)的基本情況如下
默認站點在/var/www/
配置文件在/etc/apache2/
日志在/var/log/apache/
啟動腳本是/usr/sin/apache2ctl或者/etc/init.d/apache2
Apache2已經(jīng)在前面安裝好了下面安裝SSL模塊:
安裝SSL模塊
#a2enmodssl創(chuàng)建默認的SSL證書(默認證書不是很好用)
#apache2-ssl-certificate
我們可以使用openssl來創(chuàng)建,這里我就是此方法創(chuàng)建SSL證書的
#sudoopensslreq-x509-newkeyrsa:1024-keyoutapache.pem-outapache.pem-nodes-days999注:在要求輸入CommonName(eg,YOURname)時,輸入你的主機名。
示例過程如下:

  1. #/usr/local/svn#sudoopensslreq-x509-newkeyrsa:1024-keyoutapache.pem-outapache.pem-nodes-days365Generatinga1024bitRSAprivatekey.  
  2. ++++++..++++++writingnewprivatekeyto'apache.pem'-----  
  3. Youareabouttobeaskedtoenterinformationthatwillbeincorporatedintoyourcertificaterequest  
  4. .WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.  
  5. TherearequiteafewfieldsbutyoucanleavesomeblankForsomefieldstherewillbeadefaultvalue,  
  6. Ifyouenter'.',thefieldwillbeleftblank.-----CountryName(2lettercode)[AU]:Chinastringistoolong,  
  7. itneedstobelessthan2byteslongCountryName(2lettercode)[AU]:CNStateorProvinceName(fullname)  
  8. [Some-State]:JiangxiLocalityName(eg,city)[]:NanchangOrganizationName(eg,company)[InternetWidgitsPtyLtd]  
  9. :NanchangUnversityOrganizationalUnitName(eg,section)[]:InformationCenterCommonName(eg,YOURname)[]  
  10. :LinuxServerEmailAddress[]:111@gmail.com 

復(fù)制一份站點配置做為SSL配置的原型
#cp/etc/apache2/sites-available/default/etc/apache2/sites-available/ssl#ln-s/etc/apache2/sites-available/ssl/etc/apache2/sites-enabled/ssl
編輯SSL的配置
#vi/etc/apache2/sites-enabled/ssl
把端口改為443加入SSL認證配置
其它的根據(jù)需要自己定制與普通配置無異
ServerSignatureOnSSLEngineOnSSLCertificateFile/etc/apache2/ssl/apache.pemServerAdminwebmaster@localhostDocumentRoot/var/www/OptionsFollowSymLinksAllowOverrideNoneOptionsIndexesFollowSymLinksMultiViewsAllowOverrideNoneOrderallow,denyallowfromallScriptAlias/cgi-bin//usr/lib/cgi-bin/AllowOverrideNoneOptions+ExecCGI-MultiViews+SymLinksIfOwnerMatch"/etc/apache2/sites-enabled/ssl"45L,1055C
修改普通http方式的配置(apache2這里好像不用改,默認的已經(jīng)是80端口)#vi/etc/apache2/sites-enabled/000-default把端口改為80
NameVirtualHost*:80ServerAdminwebmaster@localhost#[......]
編輯Apache+SVN+SSL配置中Apache端口配置,加入443端口(SSL的)#vi/etc/apache2/ports.conf:Listen80Listen443
源文件內(nèi)容:
NameVirtualHost*:80Listen80#Listen443#SSLnamebasedvirtualhostsarenotyetsupported,thereforeno#NameVirtualHoststatementhereListen443
這里可以不用加“Listen443”因為SSL默認認證的443端口已經(jīng)打開。
別忘了把前面生成的SSL密鑰文件拷貝過來
#/usr/local/svn#sudocp/proc/14646/cwd/apache.pem
重新載入Apache的配置
#/etc/init.d/apache2force-reload或者#/etc/init.d/apache2restart
以下是Apache+SVN+SSL配置中SSL的配置文件的示例:
 

  1. NameVirtualHost*:443  
  2. <VirtualHost*:443> 
  3. ServerSignatureOn  
  4. SSLEngineOn  
  5. SSLCertificateFile/etc/apache2/ssl/apache.pem  
  6. ServerAdminwebmaster@localhost  
  7. DocumentRoot/var/www/  
  8. <Directory/> 
  9. OptionsFollowSymLinks  
  10. AllowOverrideNone  
  11. Directory> 
  12. <Directory/var/www/> 
  13. OptionsIndexesFollowSymLinksMultiViews  
  14. AllowOverrideNone  
  15. Orderallow,deny  
  16. allowfromall  
  17. #Thisdirectiveallowsustohaveapache2'sdefaultstartpage  
  18. #in/apache2-default/,butstillhave/gototherightplace  
  19. #CommentedoutforUbuntu  
  20. #RedirectMatch^/#/apache2-default/  
  21. Directory> 

五、總結(jié)
以上是我個人查閱相關(guān)資料及實踐測試的基礎(chǔ)上總結(jié)出來的Ubuntu8.10Server上搭建
Apache+SVN+SSL模式版本控制系統(tǒng)的經(jīng)驗,安裝和配置過程中注意細心仔細,重要的配置文件注意先備份再修改,以備配置失敗還原之用。本節(jié)關(guān)于Apache+SVN+SSL配置講解完畢,請關(guān)注本節(jié)其他相關(guān)報道。 

【編輯推薦】

  1. Linux下apache+svn+ssl完美結(jié)合搭建安全版本控制平臺
  2. Linux下如何進行apache+svn+ssl配置詳解
  3. Fedora下SVN+TRAC+APACHE+SSL安裝全程跟蹤
  4. RedHatAS下SVN安裝配置技術(shù)分享
  5. Fedora下SVN+TRAC+APACHE+SSL安裝步驟簡明介紹

 

責(zé)任編輯:佚名
相關(guān)推薦

2010-05-25 19:31:03

Apache+SVN+

2010-05-25 18:32:22

apache+svn+

2010-05-28 18:53:36

配置SVN1.4.5

2010-05-25 18:20:54

apache+svn+

2010-05-31 13:00:49

MyEclipse配置

2010-05-25 18:45:05

2010-05-31 18:20:25

配置SVN訪問

2010-05-25 19:57:32

2010-02-07 14:41:28

Ubuntu 8.10

2010-05-26 15:53:52

SVN服務(wù)

2010-06-01 17:03:59

SVN用戶

2010-05-25 11:24:30

SVN安裝配置

2010-05-31 13:11:45

MyEclipse下S

2010-03-12 15:02:02

2010-06-02 14:41:46

SVN建庫

2010-03-15 15:49:01

Ubuntu 8.10

2010-03-16 18:44:55

Ubuntu 8.10

2010-05-27 18:09:08

Apache SVN配

2010-06-02 16:19:28

SVN協(xié)議

2010-05-25 18:59:37

點贊
收藏

51CTO技術(shù)棧公眾號