我的是yum安裝的lamp平臺,
apache 我已經配置好了 https訪問。
可以參照:架設CA服務器實現https通信,web服務器使用CA自簽證書與https通信
http://990487026.blog.51cto.com/10133282/1686127
安裝mod_ssl
[root@nb0001 html]# yum instyall mod_ssl openssl
修改配置文件
[root@nb0001 html]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/html"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </Directory>
重啟apache
[root@nb0001 html]# [root@nb0001 html]# [root@nb0001 html]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
另外有需要云服務器可以了解下創新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
標題名稱:CentOS強制apache全站使用https加密SSL-創新互聯
文章路徑:http://vcdvsql.cn/article12/cdejdc.html
成都網站建設公司_創新互聯,為您提供網站排名、搜索引擎優化、微信小程序、外貿建站、營銷型網站建設、面包屑導航
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯