yogeshmistry

/opt/bitnami/apache2/conf/bitnami/bitnami.conf

Aug 10th, 2020 (edited)
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. # Default Virtual Host configuration.
  2.  
  3. <IfVersion < 2.3 >
  4. NameVirtualHost *:80
  5. NameVirtualHost *:443
  6. </IfVersion>
  7.  
  8. <VirtualHost _default_:80>
  9. DocumentRoot "/opt/bitnami/apache2/htdocs"
  10. # BEGIN: Support domain renewal when using mod_proxy without Location
  11. <IfModule mod_proxy.c>
  12. ProxyPass /.well-known !
  13. </IfModule>
  14. # END: Support domain renewal when using mod_proxy without Location
  15. # BEGIN: Enable HTTP to HTTPS redirection
  16. RewriteEngine On
  17. RewriteCond %{HTTPS} !=on
  18. RewriteCond %{HTTP_HOST} !^localhost
  19. RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
  20. RewriteCond %{REQUEST_URI} !^/\.well-known
  21. RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
  22. # END: Enable HTTP to HTTPS redirection
  23. # BEGIN: Enable non-www to www redirection
  24. RewriteCond %{HTTP_HOST} !^www\. [NC]
  25. RewriteCond %{HTTP_HOST} !^localhost
  26. RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
  27. RewriteCond %{REQUEST_URI} !^/\.well-known
  28. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L]
  29. # END: Enable non-www to www redirection
  30. <Directory "/opt/bitnami/apache2/htdocs">
  31. Options Indexes FollowSymLinks
  32. AllowOverride All
  33. <IfVersion < 2.3 >
  34. Order allow,deny
  35. Allow from all
  36. </IfVersion>
  37. <IfVersion >= 2.3 >
  38. Require all granted
  39. </IfVersion>
  40. </Directory>
  41.  
  42. # Error Documents
  43. ErrorDocument 503 /503.html
  44.  
  45. # Bitnami applications installed with a prefix URL (default)
  46. Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
  47. # BEGIN: Support domain renewal when using mod_proxy within Location
  48. <Location /.well-known>
  49. <IfModule mod_proxy.c>
  50. ProxyPass !
  51. </IfModule>
  52. </Location>
  53. # END: Support domain renewal when using mod_proxy within Location
  54. </VirtualHost>
  55.  
  56. # Default SSL Virtual Host configuration.
  57.  
  58. <IfModule !ssl_module>
  59. LoadModule ssl_module modules/mod_ssl.so
  60. </IfModule>
  61.  
  62. Listen 443
  63. SSLProtocol all -SSLv2 -SSLv3
  64. SSLHonorCipherOrder on
  65. SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !EDH !RC4"
  66. SSLPassPhraseDialog builtin
  67. SSLSessionCache "shmcb:/opt/bitnami/apache2/logs/ssl_scache(512000)"
  68. SSLSessionCacheTimeout 300
  69.  
  70. <VirtualHost _default_:443>
  71. DocumentRoot "/opt/bitnami/apache2/htdocs"
  72. SSLEngine on
  73. SSLCertificateFile "/opt/bitnami/apache2/conf/_my_domain_name_.com.crt"
  74. SSLCertificateKeyFile "/opt/bitnami/apache2/conf/_my_domain_name_.com.key"
  75.  
  76. # BEGIN: Support domain renewal when using mod_proxy without Location
  77. <IfModule mod_proxy.c>
  78. ProxyPass /.well-known !
  79. </IfModule>
  80. # END: Support domain renewal when using mod_proxy without Location
  81. # BEGIN: Enable non-www to www redirection
  82. RewriteEngine On
  83. RewriteCond %{HTTP_HOST} !^www\. [NC]
  84. RewriteCond %{HTTP_HOST} !^localhost
  85. RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
  86. RewriteCond %{REQUEST_URI} !^/\.well-known
  87. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L]
  88. # END: Enable non-www to www redirection
  89. <Directory "/opt/bitnami/apache2/htdocs">
  90. Options Indexes FollowSymLinks
  91. AllowOverride All
  92. <IfVersion < 2.3 >
  93. Order allow,deny
  94. Allow from all
  95. </IfVersion>
  96. <IfVersion >= 2.3 >
  97. Require all granted
  98. </IfVersion>
  99. </Directory>
  100.  
  101. # Error Documents
  102. ErrorDocument 503 /503.html
  103.  
  104. # Bitnami applications installed with a prefix URL (default)
  105. Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf"
  106. # BEGIN: Support domain renewal when using mod_proxy within Location
  107. <Location /.well-known>
  108. <IfModule mod_proxy.c>
  109. ProxyPass !
  110. </IfModule>
  111. </Location>
  112. # END: Support domain renewal when using mod_proxy within Location
  113. </VirtualHost>
  114.  
  115. # Bitnami applications that uses virtual host configuration
  116. Include "/opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf"
  117.  
Add Comment
Please, Sign In to add comment