Jump to content

Apache:SSL Origin Cloudflare: Difference between revisions

From Wiki
No edit summary
Tag: visualeditor
No edit summary
Tag: visualeditor
Line 12: Line 12:


*Isikan Origin sertifikat dan RSA root Cloudflare
*Isikan Origin sertifikat dan RSA root Cloudflare
[[File:SSL Origin Cloudflare 1.png|center|thumb]]
*Buat file privkey.pem didalam folder <code>/etc/apache2/ssl/</code> dengan nama <code>privkey.pem</code>
*Buat file privkey.pem didalam folder <code>/etc/apache2/ssl/</code> dengan nama <code>privkey.pem</code>


Line 17: Line 18:
vim /etc/apache2/ssl/privkey.pem
vim /etc/apache2/ssl/privkey.pem
</syntaxhighlight>
</syntaxhighlight>
 
[[File:SSL Origin Cloudflare 2.png|center|thumb]]
*Lalu berikan izin
*Lalu berikan izin



Revision as of 18:53, 23 November 2022

  • Buatlah folder di /etc/apache2/ssl/

<syntaxhighlight lang="bash"> mkdir /etc/apache2/ssl/ </syntaxhighlight>

  • Selanjutnya buat file fullchain.pem didalam folder tersebut

<syntaxhighlight lang="bash"> vim /etc/apache2/ssl/fullchain.pem </syntaxhighlight>

  • Isikan Origin sertifikat dan RSA root Cloudflare
Error creating thumbnail: File missing
  • Buat file privkey.pem didalam folder /etc/apache2/ssl/ dengan nama privkey.pem

<syntaxhighlight lang="bash"> vim /etc/apache2/ssl/privkey.pem </syntaxhighlight>

Error creating thumbnail: File missing
  • Lalu berikan izin

<syntaxhighlight lang="bash"> sudo chmod -R 655 /etc/apache2/ssl </syntaxhighlight>

<syntaxhighlight lang="bash"> sudo chown -R www-data:www-data /etc/apache2/ssl </syntaxhighlight>


  • Contoh Virtual host

<syntaxhighlight lang="apacheconf"> 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 </syntaxhighlight>