沙盒:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Jinzd留言 | 贡献
无编辑摘要
Nsynet留言 | 贡献
无编辑摘要
 
(未显示5个用户的132个中间版本)
第1行: 第1行:
''mod_ssl''模块为Apache2服务器添加了一个重要的功能 - 加密通信的能力。由此,当你的浏览器通信使用SSL时,https:// 前缀被使用于统一资源定位符(URL)前。
[[文件:14.png]]
 
''mod_ssl''模块存放于''apache2-common''包中。在终端提示符下执行以下命令以允许''mod_ssl''模块:<br/><code style="background-color:lightgray">sudo a2enmod ssl</code>
 
There is a default HTTPS configuration file in /etc/apache2/sites-available/default-ssl. In order for Apache2 to provide HTTPS, a certificate and key file are also needed. The default HTTPS configuration will use a certificate and key generated by the ssl-cert package. They are good for testing, but the auto-generated certificate and key should be replaced by a certificate specific to the site or server. For information on generating a key and obtaining a certificate see [https://help.ubuntu.com/12.04/serverguide/certificates-and-security.html Certificates]
 
To configure Apache2 for HTTPS, enter the following:<br/><code style="background-color:lightgray">sudo a2ensite default-ssl</code>
 
: <span style="background-color:lightgray">The directories /etc/ssl/certs and /etc/ssl/private are the default locations. If you install the certificate and key in another directory make sure to change SSLCertificateFile and SSLCertificateKeyFile appropriately. </span>
 
With Apache2 now configured for HTTPS, restart the service to enable the new settings: <br/><code style="background-color:lightgray">sudo service apache2 restart</code>
 
: <span style="background-color:lightgray">Depending on how you obtained your certificate you may need to enter a passphrase when Apache2 starts. </span>
 
You can access the secure server pages by typing https://your_hostname/url/ in your browser address bar.

2023年10月22日 (日) 12:07的最新版本