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 [2019/12/04 23:54] – [Configure the Virtual Host] peterapache:activate_ssl [2022/06/14 08:16] (current) – [Configure the Virtual Host] peter
Line 3: Line 3:
 ===== Create folder for ssl certificate and key ===== ===== Create folder for ssl certificate and key =====
  
-<code bash> 
 sudo mkdir /etc/apache2/ssl  sudo mkdir /etc/apache2/ssl 
-</code> 
  
 ---- ----
Line 20: 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 necessary, 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>
 +
 +
  
 ---- ----
Line 29: Line 30:
 ===== Activate SSL ===== ===== Activate SSL =====
  
-<code bash>+Issue the following command: 
 + 
 +<code>
 a2enmod ssl a2enmod ssl
 </code> </code>
Line 85: Line 88:
 <WRAP info> <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> </WRAP>
  
Line 108: Line 112:
 </file> </file>
  
----- 
  
-===== Restart apache ===== +Restart apache, and your site should work
- +
-<code bash> +
-# httpd -k graceful +
-</code> +
- +
-Your site should work.+
  
 ---- ----
  
 ===== References ===== ===== References =====
 +
  
   * 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.1575503658.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki