Jump to content

Apache:SSL Origin Cloudflare

From Wiki
Revision as of 18:53, 23 November 2022 by Kangtain (talk | contribs)
  • Buatlah folder di /etc/apache2/ssl/
mkdir /etc/apache2/ssl/
  • Selanjutnya buat file fullchain.pem didalam folder tersebut
vim /etc/apache2/ssl/fullchain.pem
  • Isikan Origin sertifikat dan RSA root Cloudflare
  • Buat file privkey.pem didalam folder /etc/apache2/ssl/ dengan nama privkey.pem
vim /etc/apache2/ssl/privkey.pem
  • Lalu berikan izin
sudo chmod -R 655 /etc/apache2/ssl
sudo chown -R www-data:www-data /etc/apache2/ssl


  • Contoh Virtual host
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/html/
ServerName domain.com
ServerAlias www.domain.com

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/fullchain.pem
SSLCertificateKeyFile /etc/apache2/ssl/privkey.pem

<Directory /var/www/html/>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ErrorLog /var/log/apache2/domain.com_error
CustomLog /var/log/apache2/domain.com_access common