Guest User

Untitled

a guest
Nov 21st, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. Listen 80
  2.  
  3. <IfModule ssl_module>
  4. Listen 443
  5. </IfModule>
  6.  
  7. <IfModule mod_gnutls.c>
  8. Listen 443
  9. </IfModule>
  10.  
  11. <VirtualHost *:80>
  12. ServerName www.example.org
  13. ServerAlias example.org www4.example.org
  14. ServerAdmin webmaster@xxxxxxxx.com
  15.  
  16. Redirect 301 "/" "https://www.example.org/"
  17. </VirtualHost>
  18.  
  19. <IfModule ssl_module>
  20.  
  21. SetEnvIf HTTPS https HTTPS=on
  22. Header always set Strict-Transport-Security "max-age=63072000" env=HTTPS
  23. Header always set Content-Security-Policy: upgrade-insecure-requests env=HTTPS
  24. Header always set X-XSS-Protection: "1; mode=block"
  25. Header always set X-Frame-Options: sameorigin
  26. Header always set X-Content-Type-Options: nosniff
  27. Header always set X-Permitted-Cross-Domain-Policies: "master-only"
  28.  
  29. <VirtualHost *:443>
  30. ServerName www.example.org
  31. DocumentRoot /var/www/example/
  32.  
  33. ServerAdmin webmaster@xxxxxxxx.com
  34. SSLEngine on
  35. SSLCertificateFile "/etc/apache2/ssl/crt/www.example.org.crt"
  36. SSLCertificateChainFile "/etc/apache2/ssl/crt/IntermediateCA.example.crt"
  37. SSLCertificateKeyFile "/etc/apache2/ssl/www.example.org.key"
  38.  
  39. DirectoryIndex index.html index.htm index.php
  40.  
  41. <FilesMatch "^wp-login.php$|^wp-admin/.*">
  42. AuthName "Login Login"
  43. AuthType Basic
  44. AuthUserFile /etc/apache2/.htpasswd
  45. Require valid-user
  46. </FilesMatch>
  47.  
  48. </VirtualHost>
  49.  
  50. </IfModule>
  51.  
  52. <VirtualHost *:80>
  53. ServerName www.otherdomain.org
  54. ServerAlias otherdomain.org www4.otherdomain.org
  55. ServerAdmin webmaster@xxxxxxxx.com
  56.  
  57. Redirect 301 "/" "https://www.otherdomain.org/"
  58.  
  59. </VirtualHost>
  60.  
  61. <IfModule ssl_module>
  62.  
  63. SetEnvIf HTTPS https HTTPS=on
  64. Header always set Strict-Transport-Security "max-age=63072000" env=HTTPS
  65. Header always set Content-Security-Policy: upgrade-insecure-requests env=HTTPS
  66. Header always set X-XSS-Protection: "1; mode=block"
  67. Header always set X-Frame-Options: sameorigin
  68. Header always set X-Content-Type-Options: nosniff
  69. Header always set X-Permitted-Cross-Domain-Policies: "master-only"
  70.  
  71. <VirtualHost *:443>
  72. ServerName www.otherdomain.org
  73. DocumentRoot /var/www/otherdomain/
  74.  
  75. ServerAdmin webmaster@xxxxxxxx.com
  76. SSLEngine on
  77. SSLCertificateFile "/etc/apache2/ssl/crt/www.otherdomain.org.crt"
  78. SSLCertificateChainFile "/etc/apache2/ssl/crt/IntermediateCA.otherdomain.crt"
  79. SSLCertificateKeyFile "/etc/apache2/ssl/www.otherdomain.org.key"
  80.  
  81. DirectoryIndex index.html index.htm index.php
  82.  
  83. <FilesMatch "^wp-login.php$|^wp-admin/.*">
  84. AuthName "Login Login"
  85. AuthType Basic
  86. AuthUserFile /etc/apache2/.htpasswd
  87. Require valid-user
  88. </FilesMatch>
  89.  
  90. </VirtualHost>
  91.  
  92. </IfModule>
  93.  
  94. <VirtualHost *:80>
  95. ServerName www.otherdomain.org
  96. ServerAlias www4.otherdomain.org otherdomain.org
  97. ServerAdmin webmaster@otherdomain.org
  98. DocumentRoot /var/www/otherdomain/
  99. Redirect 301 "/" "https://www.otherdomain.org/"
  100. </VirtualHost>
  101.  
  102.  
  103.  
  104. <IfModule ssl_module>
  105. SetEnvIf HTTPS https HTTPS=on
  106. Header always set Strict-Transport-Security "max-age=63072000" env=HTTPS
  107. Header always set Content-Security-Policy: upgrade-insecure-requests env=HTTPS
  108. Header always set X-XSS-Protection: "1; mode=block"
  109. Header always set X-Frame-Options: sameorigin
  110. Header always set X-Content-Type-Options: nosniff
  111. Header always set X-Permitted-Cross-Domain-Policies: "master-only"
  112.  
  113. <VirtualHost *:443>
  114. ServerName www.otherdomain.org
  115. ServerAlias otherdomain.org
  116. DocumentRoot /var/www/otherdomain/
  117.  
  118. ServerAdmin webmaster@societyhq.com
  119. SSLEngine on
  120. SSLCertificateFile "/etc/apache2/ssl/crt/www.otherdomain.org.crt"
  121. SSLCertificateChainFile "/etc/apache2/ssl/crt/IntermediateCA.otherdomain.crt"
  122. SSLCertificateKeyFile "/etc/apache2/ssl/www.otherdomain.org.key"
  123.  
  124. DirectoryIndex index.html index.htm index.php
  125.  
  126.  
  127. <FilesMatch "^wp-login.php$|^wp-admin/.*">
  128. AuthName "Login Login"
  129. AuthType Basic
  130. AuthUserFile /etc/apache2/.htpasswd
  131. Require valid-user
  132. </FilesMatch>
  133.  
  134. </VirtualHost>
  135.  
  136. </IfModule>
Add Comment
Please, Sign In to add comment