Advertisement
fplanzer

ssl conf

Aug 24th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
  2.  
  3. DocumentRoot /var/www/html/virtual/domain.cl/www
  4. ServerName www.domain.cl:443
  5. ServerAlias domain.cl:443 www.domain.cl:443 domain.cl
  6. ScriptAlias /cgi-bin/ "/var/www/html/virtual/domain.cl/cgi-bin/"
  7.  
  8.  
  9. # Server Certificate:
  10. SSLCertificateFile /root/ssl2018/domain.cl.crt
  11.  
  12.  
  13. # Server Private Key:
  14. SSLCertificateKeyFile /root/ssl2018/domain.cl.key
  15.  
  16. # Certificate Authority (CA):
  17. SSLCACertificateFile /root/ssl2018/COMODORSADomainValidationSecureServerCA.crt
  18.  
  19.  
  20. #FIREWALL ENABLE 443
  21. iptables -A INPUT -m state --state NEW -p TCP --dport 443 -j ACCEPT
  22.  
  23. #FORCE SITE HTACCESS
  24. RewriteCond %{HTTP_HOST} domain\.cl [NC]
  25. RewriteCond %{SERVER_PORT} 80
  26. RewriteRule ^(.*)$ https://www.domain.cl/$1 [R,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement