Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. NameVirtualHost *:80
  2. NameVirtualHost *:443
  3.  
  4. <VirtualHost *:80>
  5. ServerAdmin mail@domaina.com
  6. DocumentRoot /home/www/html/domaina.com
  7. ServerName www.domaina.com
  8. ServerAlias *.domaina.com
  9. ScriptAlias /cgi-bin/ "/home/www/html/domaina.com/cgi-bin/"
  10. RewriteEngine On
  11. RewriteOptions Inherit
  12. ErrorLog /home/log/domaina.com-error_log
  13. CustomLog /home/log/domaina.com-access_log common
  14. </VirtualHost>
  15. <VirtualHost *:443>
  16. SSLEngine on
  17. SSLCertificateFile /etc/pki/tls/certs/ca.crt
  18. SSLCertificateKeyFile /etc/pki/tls/private/ca.key
  19. ServerAdmin mail@domaina.com
  20. DocumentRoot /home/www/html/domaina.com
  21. ServerName www.domaina.com
  22. ServerAlias *.domaina.com
  23. ScriptAlias /cgi-bin/ "/home/www/html/domaina.com/cgi-bin/"
  24. RewriteEngine On
  25. RewriteOptions Inherit
  26. ErrorLog /home/log/domaina.com-error_log
  27. CustomLog /home/log/domaina.com-access_log common
  28. </VirtualHost>
  29. <VirtualHost *:80>
  30. ServerAdmin mail@domainb.com
  31. DocumentRoot /home/www/html/domainb.com
  32. ServerName www.domainb.com
  33. ServerAlias *.domainb.com
  34. ScriptAlias /cgi-bin/ "/home/www/html/domainb.com/cgi-bin/"
  35. RewriteEngine On
  36. RewriteOptions Inherit
  37. ErrorLog /home/log/domainb.com-error_log
  38. CustomLog /home/log/domainb.com-access_log common
  39. </VirtualHost>
  40. <VirtualHost *:443>
  41. SSLEngine on
  42. SSLCertificateFile /etc/pki/tls/certs/ca.crt
  43. SSLCertificateKeyFile /etc/pki/tls/private/ca.key
  44. ServerAdmin mail@domainb.com
  45. DocumentRoot /home/www/html/domainb.com
  46. ServerName www.domainb.com
  47. ServerAlias *.domainb.com
  48. ScriptAlias /cgi-bin/ "/home/www/html/domainb.com/cgi-bin/"
  49. RewriteEngine On
  50. RewriteOptions Inherit
  51. ErrorLog /home/log/domainb.com-error_log
  52. CustomLog /home/log/domainb.com-access_log common
  53. </VirtualHost>
  54. <VirtualHost *:80>
  55. ServerAdmin mail@domainc.com
  56. DocumentRoot /home/www/html/domainc.com
  57. ServerName www.domainc.com
  58. ServerAlias *.domainc.com
  59. ScriptAlias /cgi-bin/ "/home/www/html/domainc.com/cgi-bin/"
  60. RewriteEngine On
  61. RewriteOptions Inherit
  62. ErrorLog /home/log/domainc.com-error_log
  63. CustomLog /home/log/domainc.com-access_log common
  64. </VirtualHost>
  65. <VirtualHost *:443>
  66. SSLEngine on
  67. SSLCertificateFile /etc/pki/tls/certs/ca.crt
  68. SSLCertificateKeyFile /etc/pki/tls/private/ca.key
  69. ServerAdmin mail@domainc.com
  70. DocumentRoot /home/www/html/domainc.com
  71. ServerName www.domainc.com
  72. ServerAlias *.domainc.com
  73. ScriptAlias /cgi-bin/ "/home/www/html/domainc.com/cgi-bin/"
  74. RewriteEngine On
  75. RewriteOptions Inherit
  76. ErrorLog /home/log/domainc.com-error_log
  77. CustomLog /home/log/domainc.com-access_log common
  78. </VirtualHost>
  79.  
  80. <IfModule mod_proxy.c>
  81. #turning ProxyRequests on and allowing proxying from all may allow
  82. #spammers to use your proxy to send email.
  83.  
  84. ProxyRequests Off
  85.  
  86. <Proxy *>
  87. AddDefaultCharset off
  88. Order deny,allow
  89. Allow from all
  90. </Proxy>
  91.  
  92. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  93. # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  94. # Set to one of: Off | On | Full | Block
  95.  
  96. ProxyVia On
  97. </IfModule>
  98.  
  99. NameVirtualHost *:80
  100.  
  101. <VirtualHost *:80>
  102. ServerAdmin mail@domainc.com
  103. ServerName www.domainc.com
  104. ErrorLog logs/domainc.com-error_log
  105. CustomLog logs/domainc.com-access_log common
  106.  
  107. ProxyRequests Off
  108. ProxyPreserveHost On
  109. ProxyPass / http://[IP of server 1]:80/
  110. ProxyPassReverse / http://[IP of server 1]:80/
  111. </VirtualHost>
  112.  
  113. ProxyPreserveHost On
  114.  
  115. ssh host2 sed -i~ '
  116. /Proxy/s/[IP of server 1]/[hostname of server 1]/
  117. ' /etc/httpd/conf/httpd.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement