Apache2_SSL
|
Size: 1373
Comment:
|
Size: 1360
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| '' '1)'' 'Install apache2 and openssl | '' 1)'' 'Install apache2 and openssl |
| Line 8: | Line 8: |
| '' '2)'' 'Generate a local certificate for our server. Usually it is getting valid for 1 year. | '' 2)'' 'Generate a local certificate for our server. Usually it is getting valid for 1 year. |
| Line 13: | Line 13: |
| '' '3)'' 'Add the port on which Apache listens for SSL as standard. | '' 3)'' 'Add the port on which Apache listens for SSL as standard. |
| Line 18: | Line 18: |
| '' '4)'' 'Enclose the SSL module. | '' 4)'' 'Enclose the SSL module. |
| Line 23: | Line 23: |
| '5'')'' 'Create and activate SSL page | '' 5)'' 'Create and activate SSL page |
| Line 28: | Line 28: |
| '6'')'' 'Edit the file you created earlier. | '' 6)'' 'Edit the file you created earlier. |
| Line 33: | Line 33: |
| '7'')'' 'Modify at the beginning of some lines. | '' 7)'' 'Modify at the beginning of some lines. |
| Line 46: | Line 46: |
| '8'')'' 'Enclosed SSL page. | '' 8)'' 'Enclosed SSL page. |
| Line 51: | Line 51: |
| '9'')'' 'Well, and finally restart Apache. | '' 9)'' 'Well, and finally restart Apache. |
| Line 57: | Line 57: |
| << BR >> https://localhost | https://localhost |
Help for those who have the desire to run SSL in Apache2:
1) 'Install apache2 and openssl
sudo apt-get install apache2 openssl
2) 'Generate a local certificate for our server. Usually it is getting valid for 1 year.
sudo apache2-ssl-certificate-days 365
3) 'Add the port on which Apache listens for SSL as standard.
echo "Listen 443" >> / etc/apache2/ports.conf
4) 'Enclose the SSL module.
sudo a2enmod ssl
5) 'Create and activate SSL page
sudo cp / etc/apache2/sites-available/default / etc/apache2/sites-available/ssl
6) 'Edit the file you created earlier.
sudo vim / etc/apache2/sites-available/ssl
7) 'Modify at the beginning of some lines.
NameVirtualHost *: 443 <VirtualHost *:443> ServerAdmin webmaster @ localhost SSLEngine On SSLCertificateFile / etc/apache2/ssl/apache.pem DocumentRoot / var / www / </ VirtualHost>
8) 'Enclosed SSL page.
ssl sudo a2ensite
9) 'Well, and finally restart Apache.
sudo / etc/init.d/apache2 force-reload
And since then we can enjoy an encrypted connection in apache. After entering this address for the first time should ask you to accept the certificate. https://localhost
Apache2_SSL (last edited 2012-07-13 23:44:36 by 70-100-132-112)