Advertisement
KeiroD

MAAS HTTPS config

Apr 8th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <IfModule mod_ssl.c>
  2. <VirtualHost _default_:443>
  3. SSLEngine On
  4. # Do not rely on these certificates, generate your own.
  5. ServerName lab-control.domain.com
  6. SSLCertificateFile /etc/letsencrypt/live/lab-control.domain.com/fullchain.pem
  7. SSLCertificateKeyFile /etc/letsencrypt/live/lab-control.domain.com/privkey.pem
  8. </VirtualHost>
  9. </IfModule>
  10.  
  11. <IfModule mod_expires.c>
  12. <Location /MAAS/>
  13. ExpiresActive On
  14. ExpiresByType text/javascript "access plus 1 hours"
  15. ExpiresByType application/javascript "access plus 1 hours"
  16. ExpiresByType application/x-javascript "access plus 1 hours"
  17. ExpiresByType text/css "access plus 1 hours"
  18. ExpiresByType image/gif "access plus 1 hours"
  19. ExpiresByType image/jpeg "access plus 1 hours"
  20. ExpiresByType image/png "access plus 1 hours"
  21. </Location>
  22. </IfModule>
  23.  
  24. <IfModule alias_module>
  25. Alias /MAAS/static/ /usr/share/maas/web/static/
  26. </IfModule>
  27.  
  28. <IfModule proxy_module>
  29. ProxyPreserveHost on
  30. ProxyPass /MAAS/ws "wss://localhost:5240/MAAS/ws"
  31. ProxyPass /MAAS/static/ !
  32. ProxyPass /MAAS/ https://localhost:5240/MAAS/
  33. ProxyPass /MAAS https://localhost:5240/MAAS/
  34. </IfModule>
  35.  
  36. <IfModule rewrite_module>
  37. RewriteEngine On
  38. # Redirect (permanently) requests for /MAAS to /MAAS/.
  39. RewriteRule ^/MAAS$ %{REQUEST_URI}/ [R=301,L]
  40. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement