Advertisement
Guest User

Virtualhost

a guest
Feb 25th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. <VirtualHost *:80>
  2. SuexecUserGroup "#1002" "#1002"
  3. ServerName blog.com
  4. ServerAlias www.blog.com
  5. ServerAlias mail.blog.com
  6. ServerAlias webmail.blog.com
  7. ServerAlias admin.blog.com
  8. DocumentRoot /home/user/domains/blog.com/public_html
  9. ErrorLog /var/log/virtualmin/blog.com_error_log
  10. CustomLog /var/log/virtualmin/blog.com_access_log combined
  11. ScriptAlias /cgi-bin/ /home/user/domains/blog.com/cgi-bin/
  12. ScriptAlias /awstats/ /home/user/domains/blog.com/cgi-bin/
  13. DirectoryIndex index.php index.php4 index.php5 index.htm index.html
  14. <Directory /home/user/domains/blog.com/public_html>
  15. Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
  16. allow from all
  17. AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
  18. Require all granted
  19. AddType application/x-httpd-php .php
  20. AddHandler fcgid-script .php
  21. AddHandler fcgid-script .php7.4
  22. FCGIWrapper /home/user/domains/blog.com/fcgi-bin/php7.4.fcgi .php
  23. FCGIWrapper /home/user/domains/blog.com/fcgi-bin/php7.4.fcgi .php7.4
  24. </Directory>
  25. <Directory /home/user/domains/blog.com/cgi-bin>
  26. allow from all
  27. AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
  28. Require all granted
  29. </Directory>
  30. RewriteEngine on
  31. RewriteCond %{HTTP_HOST} =webmail.blog.com
  32. RewriteRule ^(?!/.well-known)(.*) https://blog.com:20000/ [R]
  33. RewriteCond %{HTTP_HOST} =admin.blog.com
  34. RewriteRule ^(?!/.well-known)(.*) https://blog.com:10000/ [R]
  35. RemoveHandler .php
  36. RemoveHandler .php7.4
  37. php_admin_value engine Off
  38. FcgidMaxRequestLen 1073741824
  39. <Files awstats.pl>
  40. AuthName "blog.com statistics"
  41. AuthType Basic
  42. AuthUserFile /home/user/domains/blog.com/.awstats-htpasswd
  43. require valid-user
  44. </Files>
  45. Alias /dav /home/user/domains/blog.com/public_html
  46. <Location /dav>
  47. DAV on
  48. AuthType Basic
  49. AuthName "blog.com"
  50. AuthUserFile /home/user/domains/blog.com/etc/dav.digest.passwd
  51. Require valid-user
  52. ForceType text/plain
  53. Satisfy All
  54. RemoveHandler .php
  55. RemoveHandler .php7.4
  56. RewriteEngine off
  57. </Location>
  58. </VirtualHost>
  59. <VirtualHost 161.97.143.106:443>
  60. SuexecUserGroup "#1002" "#1002"
  61. ServerName blog.com
  62. ServerAlias www.blog.com
  63. ServerAlias mail.blog.com
  64. ServerAlias webmail.blog.com
  65. ServerAlias admin.blog.com
  66. DocumentRoot /home/user/domains/blog.com/public_html
  67. ErrorLog /var/log/virtualmin/blog.com_error_log
  68. CustomLog /var/log/virtualmin/blog.com_access_log combined
  69. ScriptAlias /cgi-bin/ /home/user/domains/blog.com/cgi-bin/
  70. ScriptAlias /awstats/ /home/user/domains/blog.com/cgi-bin/
  71. DirectoryIndex index.php index.php4 index.php5 index.htm index.html
  72. <Directory /home/user/domains/blog.com/public_html>
  73. Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
  74. allow from all
  75. AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
  76. Require all granted
  77. AddType application/x-httpd-php .php
  78. AddHandler fcgid-script .php
  79. AddHandler fcgid-script .php7.4
  80. FCGIWrapper /home/user/domains/blog.com/fcgi-bin/php7.4.fcgi .php
  81. FCGIWrapper /home/user/domains/blog.com/fcgi-bin/php7.4.fcgi .php7.4
  82. </Directory>
  83. <Directory /home/user/domains/blog.com/cgi-bin>
  84. allow from all
  85. AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
  86. Require all granted
  87. </Directory>
  88. RewriteEngine on
  89. RewriteCond %{HTTP_HOST} =webmail.blog.com
  90. RewriteRule ^(?!/.well-known)(.*) https://blog.com:20000/ [R]
  91. RewriteCond %{HTTP_HOST} =admin.blog.com
  92. RewriteRule ^(?!/.well-known)(.*) https://blog.com:10000/ [R]
  93. RemoveHandler .php
  94. RemoveHandler .php7.4
  95. php_admin_value engine Off
  96. FcgidMaxRequestLen 1073741824
  97. SSLEngine on
  98. SSLCertificateFile /home/user/domains/blog.com/ssl.cert
  99. SSLCertificateKeyFile /home/user/domains/blog.com/ssl.key
  100. SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
  101. <Files awstats.pl>
  102. AuthName "blog.com statistics"
  103. AuthType Basic
  104. AuthUserFile /home/user/domains/blog.com/.awstats-htpasswd
  105. require valid-user
  106. </Files>
  107. Alias /dav /home/user/domains/blog.com/public_html
  108. <Location /dav>
  109. DAV on
  110. AuthType Basic
  111. AuthName "blog.com"
  112. AuthUserFile /home/user/domains/blog.com/etc/dav.digest.passwd
  113. Require valid-user
  114. ForceType text/plain
  115. Satisfy All
  116. RemoveHandler .php
  117. RemoveHandler .php7.4
  118. RewriteEngine off
  119. </Location>
  120. SSLCACertificateFile /home/user/domains/blog.com/ssl.ca
  121. </VirtualHost>
  122.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement