Advertisement
yogeshmistry

/opt/bitnami/apache2/conf/bitnami/bitnami.conf (10-2-21)

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