个人工具

“沙盒”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第5行: 第5行:
 
在/etc/apache2/sites-available/default-ssl.conf中有一个缺省的SSL配置。为了让Apache2提供HTTPS,你还需要一个certificate(证书)和一个key文件。缺省的HTTPS配置使用的证书和key是有ssl-cert包生成的。他们用于测试非常好,但是对于特定的服务器或网站,它们需要被取代。如何生成key并获得证书请参看[https://help.ubuntu.com/12.04/serverguide/certificates-and-security.html Certificates]
 
在/etc/apache2/sites-available/default-ssl.conf中有一个缺省的SSL配置。为了让Apache2提供HTTPS,你还需要一个certificate(证书)和一个key文件。缺省的HTTPS配置使用的证书和key是有ssl-cert包生成的。他们用于测试非常好,但是对于特定的服务器或网站,它们需要被取代。如何生成key并获得证书请参看[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>
+
配置Apache2 HTTPS请输入下面指令:<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>
 
: <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>

2016年6月8日 (三) 14:01的版本

mod_ssl模块为Apache2服务器添加了一个重要的功能 - 加密通信的能力。由此,当你的浏览器通信使用SSL时,https:// 前缀被使用于统一资源定位符(URL)前。

mod_ssl模块存放于apache2-common包中。在终端提示符下执行以下命令以允许mod_ssl模块:
sudo a2enmod ssl

在/etc/apache2/sites-available/default-ssl.conf中有一个缺省的SSL配置。为了让Apache2提供HTTPS,你还需要一个certificate(证书)和一个key文件。缺省的HTTPS配置使用的证书和key是有ssl-cert包生成的。他们用于测试非常好,但是对于特定的服务器或网站,它们需要被取代。如何生成key并获得证书请参看Certificates

配置Apache2 HTTPS请输入下面指令:
sudo a2ensite default-ssl

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.

With Apache2 now configured for HTTPS, restart the service to enable the new settings:
sudo service apache2 restart

Depending on how you obtained your certificate you may need to enter a passphrase when Apache2 starts.

You can access the secure server pages by typing https://your_hostname/url/ in your browser address bar.