Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. DocumentRoot "/var/www/html"
  2.  
  3. Header always set Access-Control-Allow-Origin "*"
  4.  
  5. Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
  6.  
  7. Header always set Access-Control-Max-Age "1000"
  8.  
  9. Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, Authorization, accept, client-security-token, AKEY, APWD, LoginToken, MPWD, TimeStamp, device, version"
  10.  
  11. # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
  12.  
  13. RewriteEngine On
  14. RewriteCond %{REQUEST_METHOD} OPTIONS
  15. RewriteRule ^(.*)$ $1 [R=200,L]
  16.  
  17. <VirtualHost *:80>
  18. ServerName alpha.com
  19. Redirect permanent / https://www.alpha.com/
  20. </VirtualHost>
  21.  
  22. <VirtualHost *:80>
  23. # real server configuration
  24. ServerName www.alpha.com
  25. RewriteEngine On
  26. RewriteCond %{HTTPS} off
  27. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  28. </VirtualHost>
  29.  
  30. <VirtualHost *:80>
  31. ServerName beta.com
  32. Redirect permanent / https://www.beta.com/
  33. </VirtualHost>
  34.  
  35. <VirtualHost *:80>
  36. # real server configuration
  37. ServerName www.beta.com
  38. RewriteEngine On
  39. RewriteCond %{HTTPS} off
  40. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  41. </VirtualHost>
  42.  
  43. Listen 443 https
  44.  
  45. SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
  46.  
  47. SSLSessionCache shmcb:/run/httpd/sslcache(512000)
  48. SSLSessionCacheTimeout 300
  49.  
  50. SSLRandomSeed startup file:/dev/urandom 256
  51. SSLRandomSeed connect builtin
  52. SSLCryptoDevice builtin
  53. NameVirtualHost *:443
  54.  
  55. <VirtualHost *:443>
  56.  
  57. ServerName www.alpha.com:443
  58.  
  59. ErrorLog logs/ssl_error_log
  60. TransferLog logs/ssl_access_log
  61. LogLevel warn
  62.  
  63. <IfModule log_config_module>
  64. LogFormat "%h %l %u %t "%r" %>s %b %T/%{ms}T "%{Referer}i" "%{User-Agent}i"" combined
  65. LogFormat "%h %l %u %t "%r" %>s %b %T/%{ms}T" common
  66.  
  67. <IfModule logio_module>
  68. LogFormat "%h %l %u %t "%r" %>s %b %T/%{ms}T "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
  69. </IfModule>
  70. CustomLog "logs/ssl_access_log" combined
  71. </IfModule>
  72.  
  73. SSLEngine on
  74.  
  75. SSLProtocol all -SSLv2
  76.  
  77. SSLCertificateFile /etc/pki/tls/certs/421d10cb370c04ca.crt
  78. SSLCertificateKeyFile /etc/pki/tls/private/privatekey.pem
  79. SSLCertificateChainFile /etc/pki/tls/certs/gd_bundle-g2-g1.crt
  80. <Files ~ ".(cgi|shtml|phtml|php3?)$">
  81. SSLOptions +StdEnvVars
  82. </Files>
  83. <Directory "/var/www/cgi-bin">
  84. SSLOptions +StdEnvVars
  85. </Directory>
  86. BrowserMatch "MSIE [2-5]"
  87. nokeepalive ssl-unclean-shutdown
  88. downgrade-1.0 force-response-1.0
  89.  
  90. CustomLog logs/ssl_request_log
  91. "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
  92. </VirtualHost>
  93.  
  94. <VirtualHost *:443>
  95.  
  96. ServerName www.beta.com:443
  97.  
  98. ErrorLog logs/ssl_error_log
  99. TransferLog logs/ssl_access_log
  100. LogLevel warn
  101.  
  102. <IfModule log_config_module>
  103. LogFormat "%h %l %u %t "%r" %>s %b %T/%{ms}T "%{Referer}i" "%{User-Agent}i"" combined
  104. LogFormat "%h %l %u %t "%r" %>s %b %T/%{ms}T" common
  105.  
  106. <IfModule logio_module>
  107. LogFormat "%h %l %u %t "%r" %>s %b %T/%{ms}T "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
  108. </IfModule>
  109. CustomLog "logs/ssl_access_log" combined
  110. </IfModule>
  111.  
  112. SSLEngine on
  113.  
  114. SSLProtocol all -SSLv2
  115.  
  116. SSLCertificateFile /etc/pki/tls/certs/421d10cb370c04ca.crt
  117. SSLCertificateKeyFile /etc/pki/tls/private/privatekey.pem
  118. SSLCertificateChainFile /etc/pki/tls/certs/gd_bundle-g2-g1.crt
  119. <Files ~ ".(cgi|shtml|phtml|php3?)$">
  120. SSLOptions +StdEnvVars
  121. </Files>
  122. <Directory "/var/www/cgi-bin">
  123. SSLOptions +StdEnvVars
  124. </Directory>
  125. BrowserMatch "MSIE [2-5]"
  126. nokeepalive ssl-unclean-shutdown
  127. downgrade-1.0 force-response-1.0
  128.  
  129. CustomLog logs/ssl_request_log
  130. "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
  131. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement