沙盒:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Jinzd留言 | 贡献
无编辑摘要
Jinzd留言 | 贡献
无编辑摘要
第1行: 第1行:
: Apache2模块
The ''mod_ssl'' module adds an important feature to the Apache2 server - the ability to encrypt communications. Thus, when your browser is communicating using SSL, the https:// prefix is used at the beginning of the Uniform Resource Locator (URL) in the browser navigation bar.
: <hr>


: Apache2是一个模块化的服务器。这意味着只有最基本的功能被纳入核心服务器。其他扩展的功能则是通过模块载入Apache2的。缺省情况下,服务器编译时只包含了一套基本的模块。如果服务器被编译为使用模块的动态装载,那么模块可以单独地被编译,并且可以通过''LoadModule''指令随时添加模块。否则,Apache2在添加和移除模块时必须被编译。
The ''mod_ssl'' module is available in ''apache2-common'' package. Execute the following command from a terminal prompt to enable the ''mod_ssl'' module:<br/><code style="background-color:lightgray">sudo a2enmod ssl</code>
: Ubuntu编译Apache2允许模块的动态装载。配置指令可以用条件包含,需要的模块可以放置在一个封闭的''&lt;IfModule&gt;''块中。
 
: 你也可在你的Web服务器中安装其他Apache2模块。例如,运行下面终端命令以安装认证的''MySQL''模块:<br/><code style="background-color:lightgray">sudo apt-get install libapache2-mod-auth-mysql</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]]
: 参看/etc/apache2/mods-available目录下相关的附加模块。
: 使用a2enmod工具以允许一个模块:<br/><code style="background-color:lightgray">sudo a2enmod auth_mysql</code><br/><code style="background-color:lightgray">sudo service apache2 restart</code>
: 同样地,a2dismod也可以禁止一个模块:<br/><code style="background-color:lightgray">sudo a2dismod auth_mysql</code><br/><code style="background-color:lightgray">sudo service apache2 restart</code>

2016年6月8日 (三) 13:18的版本

The mod_ssl module adds an important feature to the Apache2 server - the ability to encrypt communications. Thus, when your browser is communicating using SSL, the https:// prefix is used at the beginning of the Uniform Resource Locator (URL) in the browser navigation bar.

The mod_ssl module is available in apache2-common package. Execute the following command from a terminal prompt to enable the mod_ssl module:
sudo a2enmod ssl

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 [Certificates]