User Tools

Site Tools


apache:activate_ssl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
apache:activate_ssl [2020/07/17 14:26] – old revision restored (2016/10/11 01:24) 198.27.66.59apache:activate_ssl [2022/06/14 08:16] (current) – [Configure the Virtual Host] peter
Line 5: Line 5:
 sudo mkdir /etc/apache2/ssl  sudo mkdir /etc/apache2/ssl 
  
 +----
  
 ===== Get a certificate ===== ===== Get a certificate =====
Line 16: Line 17:
 </code> </code>
  
-**NOTE**:  When you enter all the details for the certificate make sure that you have the same common name as your hostname , otherwise you will get a warning in your apache2 log for not having the right hostname. (not neccessary, but better to avoid this)+<WRAP notice> 
 +**NOTE**:  When you enter all the details for the certificate make sure that you have the same common name as your hostname, otherwise you will get a warning in your apache2 log for not having the right hostname. (not neccessary, but better to avoid this)
  
 Be sure to keep the intermediate files (.key and .csr) that you create in this step. Be sure to keep the intermediate files (.key and .csr) that you create in this step.
  
 +</WRAP>
 +
 +
 +
 +----
  
 ===== Activate SSL ===== ===== Activate SSL =====
Line 29: Line 36:
 </code> </code>
  
 +----
  
 ===== Listen on Port 443 ===== ===== Listen on Port 443 =====
Line 38: Line 46:
 </code> </code>
  
 +<WRAP info>
 **NOTE:**  You do not have to edit your **ports.conf** file because it already contains **Listen 443**. **NOTE:**  You do not have to edit your **ports.conf** file because it already contains **Listen 443**.
 +</WRAP>
  
 +----
  
 ===== Create a SSL page under sites-available ===== ===== Create a SSL page under sites-available =====
Line 58: Line 69:
 </file> </file>
  
 +----
  
 ===== Configure the Virtual Host ===== ===== Configure the Virtual Host =====
Line 74: Line 86:
 </file> </file>
  
 +<WRAP info>
 **NOTE**: You can also put the line **NameVirtualHost [your IP address]:443** into **/etc/apache2/apache2.conf** for clarity. **NOTE**: You can also put the line **NameVirtualHost [your IP address]:443** into **/etc/apache2/apache2.conf** for clarity.
  
 +</WRAP>
  
 Now you can set up the site you want to run using SSL as you normally would. For example, you might have a file called 'mysite.conf' in /etc/apache2/sites-enabled, and you might add this to it: Now you can set up the site you want to run using SSL as you normally would. For example, you might have a file called 'mysite.conf' in /etc/apache2/sites-enabled, and you might add this to it:
Line 101: Line 115:
 Restart apache, and your site should work Restart apache, and your site should work
  
 +----
  
 ===== References ===== ===== References =====
Line 107: Line 122:
   * https://help.ubuntu.com/community/forum/server/apache2/SSL   * https://help.ubuntu.com/community/forum/server/apache2/SSL
   * http://wiki.vpslink.com/Enable_SSL_on_Apache2   * http://wiki.vpslink.com/Enable_SSL_on_Apache2
 +
  
  
apache/activate_ssl.1594995995.txt.gz · Last modified: 2020/07/17 14:26 by 198.27.66.59

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki