Apache2_SSL
Size: 1372
Comment: converted to 1.6 markup
|
Size: 1373
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Pomoc dla tych którzy mają chęć uruchomic SSL w Apache2: | Help for those who have the desire to run SSL in Apache2: |
Line 3: | Line 3: |
'''1)''' Instalujemy apache2 oraz openssl | '' '1)'' 'Install apache2 and openssl |
Line 8: | Line 8: |
'''2)''' Generujemy lokalny certyfikat dla naszego serwera. Zazwyczaj robi sie go z ważnością na 1 rok. | '' '2)'' 'Generate a local certificate for our server. Usually it is getting valid for 1 year. |
Line 10: | Line 10: |
sudo apache2-ssl-certificate -days 365 | sudo apache2-ssl-certificate-days 365 |
Line 13: | Line 13: |
'''3)''' Dodajemy port na jakim nasluchuje standardowo apache dla SSL. | '' '3)'' 'Add the port on which Apache listens for SSL as standard. |
Line 15: | Line 15: |
echo "Listen 443" >> /etc/apache2/ports.conf | echo "Listen 443" >> / etc/apache2/ports.conf |
Line 18: | Line 18: |
'''4)''' Zalaczamy modul SSL. | '' '4)'' 'Enclose the SSL module. |
Line 20: | Line 20: |
sudo a2enmod ssl | sudo a2enmod ssl |
Line 23: | Line 23: |
'''5)''' Tworzymy i aktywujemy strone SSL | '5'')'' 'Create and activate SSL page |
Line 25: | Line 25: |
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl | sudo cp / etc/apache2/sites-available/default / etc/apache2/sites-available/ssl |
Line 28: | Line 28: |
'''6)''' Edytujemy wczesniej utworzony plik. | '6'')'' 'Edit the file you created earlier. |
Line 30: | Line 30: |
sudo vim /etc/apache2/sites-available/ssl | sudo vim / etc/apache2/sites-available/ssl |
Line 33: | Line 33: |
'''7)''' Modyfikujemy na samym poczatku kilka linijek. | '7'')'' 'Modify at the beginning of some lines. |
Line 35: | Line 35: |
NameVirtualHost *:443 <virtualhost *:443> ServerAdmin webmaster@localhost |
NameVirtualHost *: 443 <VirtualHost *:443> ServerAdmin webmaster @ localhost |
Line 39: | Line 39: |
SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem |
SSLEngine On SSLCertificateFile / etc/apache2/ssl/apache.pem |
Line 42: | Line 42: |
DocumentRoot /var/www/ </virtualhost> |
DocumentRoot / var / www / </ VirtualHost> |
Line 46: | Line 46: |
'''8)''' Zalaczamy strone SSL. | '8'')'' 'Enclosed SSL page. |
Line 48: | Line 48: |
sudo a2ensite ssl | ssl sudo a2ensite |
Line 51: | Line 51: |
'''9)''' No i na koniec restart apacha. | '9'')'' 'Well, and finally restart Apache. |
Line 53: | Line 53: |
sudo /etc/init.d/apache2 force-reload | sudo / etc/init.d/apache2 force-reload |
Line 56: | Line 56: |
I od tej pory mozemy sie cieszyc szyfrowanym polaczeniem w apache. Po wejsciu na ten adres powinno za pierwszym razem zapytac was o akceptacje certyfikatu. <<BR>>https://localhost |
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. << BR >> 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. << BR >> https://localhost
Apache2_SSL (last edited 2012-07-13 23:44:36 by 70-100-132-112)