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 [2016/11/10 09:55] – [Listen on Port 443] peterapache: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 17: Line 18:
  
 <WRAP notice> <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) +**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>+
  
 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 31: Line 36:
 </code> </code>
  
 +----
  
 ===== Listen on Port 443 ===== ===== Listen on Port 443 =====
Line 43: Line 49:
 **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> </WRAP>
 +
 +----
  
 ===== Create a SSL page under sites-available ===== ===== Create a SSL page under sites-available =====
Line 61: Line 69:
 </file> </file>
  
 +----
  
 ===== Configure the Virtual Host ===== ===== Configure the Virtual Host =====
Line 77: 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 104: Line 115:
 Restart apache, and your site should work Restart apache, and your site should work
  
 +----
  
 ===== References ===== ===== References =====
Line 110: 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.1478771727.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki