Guest User

example-ssl-conf-2

a guest
Oct 8th, 2020
1,022
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <IfModule mod_ssl.c>
  2. <VirtualHost _default_:443> #*:443
  3. ServerAdmin [email protected]
  4. ServerName example.com
  5. DocumentRoot /var/www/example.com/
  6. ErrorLog ${APACHE_LOG_DIR}/error.log
  7. CustomLog ${APACHE_LOG_DIR}/access.log combined
  8.  
  9. <Directory /var/www/example.com/>
  10. Options Indexes FollowSymLinks MultiViews
  11. AllowOverride All
  12. Require all granted
  13. </Directory>
  14.  
  15. # Uncomment the below after you complete SSL installation from terminal #
  16. #RewriteEngine on
  17. #RewriteCond %{SERVER_NAME} =example.com
  18. #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  19.  
  20. Include /etc/letsencrypt/options-ssl-apache.conf
  21.  
  22. # Enable/Disable SSL for this virtual host.
  23. SSLEngine on
  24. SSLProxyEngine on
  25.  
  26. #SSLVerifyClient require
  27. #SSLVerifyDepth 10
  28.  
  29. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  30. SSLOptions +StdEnvVars
  31. </FilesMatch>
  32. <Directory /usr/lib/cgi-bin>
  33. SSLOptions +StdEnvVars
  34. </Directory>
  35.  
  36. SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
  37. SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
  38. </VirtualHost>
  39. </IfModule>
  40.  
  41. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  42.  
Add Comment
Please, Sign In to add comment