Advertisement
Geeky_face-al

Untitled

May 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. # virtual host untuk domain domainnya
  2. <VirtualHost *:80>
  3. ServerAdmin webmaster@domainnya.com
  4. DocumentRoot "/path/ke-file/websitenya"
  5. ServerName domainnya.com
  6. ServerAlias www.domainnya.com
  7. RewriteEngine On
  8. RewriteCond %{HTTPS} off
  9. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  10.  
  11. ErrorLog /etc/apache2/error.log
  12. CustomLog /etc/apache2/access.log common
  13. </VirtualHost>
  14.  
  15.  
  16. # untuk httpsnya
  17. <VirtualHost *:443>
  18. ServerAdmin webmaster@domainnya.com
  19. DocumentRoot "/path/ke-file/websitenya"
  20. ServerName domainnya.com
  21. ServerAlias www.domainnya.com
  22. ErrorLog /etc/apache2/error.log
  23. CustomLog /etc/apache2/access.log common
  24. SSLEngine on
  25. SSLCertificateFile /path/ke-file/crt-sslnya.pem
  26. SSLCertificateKeyFile /path/ke-file/crt-sslnya.key
  27.  
  28. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement