Bilgi Bankası

SSL sertifikamı manuel sunucuya (Nginx/Apache) nasıl kurarım?

SSL sertifikamı manuel sunucuya (Nginx/Apache) nasıl kurarım?

.crt ve .key dosyalarını sunucuya kopyalayın ve /etc/ssl/certs ile /etc/ssl/private dizinlerine yerleştirin (özel anahtar için chmod 600). Apache yapılandırması: /etc/apache2/sites-available/example.com-le-ssl.conf dosyası oluşturun veya düzenleyin: ```apache ServerName example.com DocumentRoot /var/www/example.com SSLEngine on SSLCertificateFile /etc/ssl/certs/example.com.crt SSLCertificateKeyFile /etc/ssl/private/example.com.key SSLCertificateChainFile /etc/ssl/certs/chain.pem AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/example_error.log CustomLog ${APACHE_LOG_DIR}/example_access.log combined ``` SSL modülünü ve siteyi etkinleştirin: ```bash sudo a2enmod ssl sudo a2ensite example.com-le-ssl.conf sudo systemctl restart apache2 ``` Nginx yapılandırması: /etc/nginx/sites-available/example.com.conf dosyasını açın veya oluşturun ve SSL bloğunu ekleyin: ```nginx server { listen 443 ssl http2; server_name example.com; root /var/www/example.com; index index.php index.html index.htm; ssl_certificate /etc/ssl/certs/example.com.crt; ssl_certificate_key /etc/ssl/private/example.com.key; ssl_trusted_certificate /etc/ssl/certs/chain.pem; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; } access_log /var/log/nginx/example_access.log; error_log /var/log/nginx/example_error.log; } ``` Siteyi etkinleştirin ve yeniden başlatın: ```bash sudo ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/ sudo systemctl restart nginx ```

Aradığınız Bilgiyi Bulamıyor musunuz?

Bilgi bankasını detaylı olarak incelediniz, fakat ihtiyacınız olan bilgiyi bulamıyorsanız,

Bir Destek Talebi Oluşturun.
Faydalı Buldunuz mu?

1 defa görüntülendi | 0 kişi faydalı buldu

3826704865 +38267054865 +38267054865 Top