Indeks forum Nasze Pasieki
Tutorial Apache - Enable HTTPS - Wersja do druku

+- Indeks forum Nasze Pasieki (https://naszepasieki.org/forum)
+-- Dział: Forum Administracyjne (https://naszepasieki.org/forum/forumdisplay.php?fid=3)
+--- Dział: Admin ukryte (https://naszepasieki.org/forum/forumdisplay.php?fid=4)
+---- Dział: Systemy Operacyjne (https://naszepasieki.org/forum/forumdisplay.php?fid=67)
+----- Dział: Linux (https://naszepasieki.org/forum/forumdisplay.php?fid=71)
+------ Dział: SSL (https://naszepasieki.org/forum/forumdisplay.php?fid=84)
+------ Wątek: Tutorial Apache - Enable HTTPS (/showthread.php?tid=225)



Tutorial Apache - Enable HTTPS - matt - 10-26-2022

Kod:
apt-get update
apt-get install apache2 openssl



Kod:
apt-get update
apt-get install apache2 openssl


Kod:
sudo nano /etc/apache2/apache2.conf

write

<Directory /var/www/html>
AllowOverride All
</Directory>


Kod:
mkdir /etc/apache2/certificate
cd /etc/apache2/certificate
# sudo openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out apache-certificate.crt -keyout apache.key

Kod:
sudo nano /etc/apache2/sites-enabled/000-default.conf


Write :

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


 <VirtualHost *:443>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on
        SSLCertificateFile /etc/apache2/certificate/apache-certificate.crt  
        SSLCertificateKeyFile /etc/apache2/certificate/apache.key
</VirtualHost>



Kod:
service apache2 restart


wiecej na ten temat w ponizszym linku 

https://techexpert.tips/apache/enable-https-apache/

Lub tutaj : https://linuxhint.com/enable-https-apache-web-server/