[Work]apache同时允许http和https访问

作者:fangzhzh
声明:允许未经作者的同意进行非商业目的的转载,但必须保证原文完整性
本文永久链接地址:http://fangzhzh.info/blog/2010/4/apache-http-and-https

部门架设的服务器服务有很多服务,mantis, dokuwiki, doxygen的文档,等等。
这个时候需要http来访问mantis, dokuwiki的(方便),而svn的代码服务器需要https
访问(安全)。

下面上我在配置的时候查到的一些资料,记录于下:

为不同的访问方式配置不同的访问virtual host

https的

[code lang="shell"]

DocumentRoot /var/www/html
ServerName server01.com

SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/
server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.crt/
server.key
SSLProtocol all
SSLVerifyClient none

SSLOptions +StdEnvVars


SSLOptions +StdEnvVars



[/code]

http 的

[code lang="shell"]
   
             DocumentRoot /var/www/html
             ServerName server01.com
                 SSLEngine off
		 #此处添加80的设置
                 
                 
         

[/code]

© 2012 Tao of Programmer Suffusion theme by Sayontan Sinha