Advertisement
Guest User

Untitled

a guest
Dec 30th, 2017
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <VirtualHost *:80>
  2.  
  3. ServerAdmin webmaster@localhost
  4. DocumentRoot /var/www/html
  5.  
  6.  
  7. ErrorLog ${APACHE_LOG_DIR}/error.log
  8. CustomLog ${APACHE_LOG_DIR}/access.log combined
  9.  
  10. RewriteEngine on
  11. RewriteCond %{SERVER_NAME} =XXX.XXXX.XXX
  12. RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
  13. </VirtualHost>
  14.  
  15. <IfModule mod_ssl.c>
  16. <VirtualHost *:443>
  17.  
  18. ServerAdmin webmaster@localhost
  19. DocumentRoot /var/www/html
  20.  
  21. ErrorLog ${APACHE_LOG_DIR}/error.log
  22. CustomLog ${APACHE_LOG_DIR}/access.log combined
  23.  
  24. Protocols h2 h2c http/1.1
  25.  
  26. Alias /nextcloud "/var/www/html/"
  27.  
  28. <Directory /var/www/html/>
  29. Options +FollowSymlinks
  30. AllowOverride All
  31.  
  32. <IfModule mod_dav.c>
  33. Dav off
  34. </IfModule>
  35.  
  36. SetEnv HOME /var/www/html
  37. SetEnv HTTP_HOME /var/www/html
  38.  
  39. Satisfy Any
  40. </Directory>
  41.  
  42. Alias /ampache "/var/www/ampache/"
  43.  
  44. <Directory /var/www/ampache/>
  45. AllowOverride All
  46. </Directory>
  47.  
  48. ServerName XXX.XXXX.XXX
  49. <IfModule mod_headers.c>
  50. Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
  51. </IfModule>
  52.  
  53. SSLCertificateFile /etc/letsencrypt/live/XXX.XXXX.XXX/fullchain.pem
  54. SSLCertificateKeyFile /etc/letsencrypt/live/XXX.XXXX.XXX/privkey.pem
  55. Include /etc/letsencrypt/options-ssl-apache.conf
  56. ServerName XXX.XXXX.XXX
  57. </VirtualHost>
  58. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement