Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # virtual host untuk domain domainnya
- <VirtualHost *:80>
- ServerAdmin webmaster@domainnya.com
- DocumentRoot "/path/ke-file/websitenya"
- ServerName domainnya.com
- ServerAlias www.domainnya.com
- RewriteEngine On
- RewriteCond %{HTTPS} off
- RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
- ErrorLog /etc/apache2/error.log
- CustomLog /etc/apache2/access.log common
- </VirtualHost>
- # untuk httpsnya
- <VirtualHost *:443>
- ServerAdmin webmaster@domainnya.com
- DocumentRoot "/path/ke-file/websitenya"
- ServerName domainnya.com
- ServerAlias www.domainnya.com
- ErrorLog /etc/apache2/error.log
- CustomLog /etc/apache2/access.log common
- SSLEngine on
- SSLCertificateFile /path/ke-file/crt-sslnya.pem
- SSLCertificateKeyFile /path/ke-file/crt-sslnya.key
- </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement