Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
- DocumentRoot /var/www/html/virtual/domain.cl/www
- ServerName www.domain.cl:443
- ServerAlias domain.cl:443 www.domain.cl:443 domain.cl
- ScriptAlias /cgi-bin/ "/var/www/html/virtual/domain.cl/cgi-bin/"
- # Server Certificate:
- SSLCertificateFile /root/ssl2018/domain.cl.crt
- # Server Private Key:
- SSLCertificateKeyFile /root/ssl2018/domain.cl.key
- # Certificate Authority (CA):
- SSLCACertificateFile /root/ssl2018/COMODORSADomainValidationSecureServerCA.crt
- #FIREWALL ENABLE 443
- iptables -A INPUT -m state --state NEW -p TCP --dport 443 -j ACCEPT
- #FORCE SITE HTACCESS
- RewriteCond %{HTTP_HOST} domain\.cl [NC]
- RewriteCond %{SERVER_PORT} 80
- RewriteRule ^(.*)$ https://www.domain.cl/$1 [R,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement