CentOS 强制apache全站使用https 加密SSL
我的是yum安装的lamp平台,
apache 我已经配置好了 https访问。
可以参照:架设CA服务器实现https通信,web服务器使用CA自签证书与https通信
http://990487026.blog.51cto.com/10133282/1686127
安装mod_ssl
[root@nb0001html]#yuminstyallmod_sslopenssl
修改配置文件
[root@nb0001html]#vim/etc/httpd/conf/httpd.conf<Directory"/var/www/html">##PossiblevaluesfortheOptionsdirectiveare"None","All",#oranycombinationof:#IndexesIncludesFollowSymLinksSymLinksifOwnerMatchExecCGIMultiViews##Notethat"MultiViews"mustbenamed*explicitly*---"OptionsAll"#doesn'tgiveittoyou.##TheOptionsdirectiveisbothcomplicatedandimportant.Pleasesee#http://httpd.apache.org/docs/2.2/mod/core.html#options#formoreinformation.#OptionsIndexesFollowSymLinks##AllowOverridecontrolswhatdirectivesmaybeplacedin.htaccessfiles.#Itcanbe"All","None",oranycombinationofthekeywords:#OptionsFileInfoAuthConfigLimit#AllowOverrideNone##Controlswhocangetstufffromthisserver.#Orderallow,denyAllowfromallRewriteEngineOnRewriteCond%{HTTPS}!onRewriteRule(.*)https://%{HTTP_HOST}%{REQUEST_URI}</Directory>
重启apache
[root@nb0001html]#[root@nb0001html]#[root@nb0001html]#servicehttpdrestartStoppinghttpd:[OK]Startinghttpd:[OK]
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。