elRafa

Plesk httpd.conf with 'too many redirects' subdomain issue

Jun 29th, 2011
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.18 KB | None | 0 0
  1. # ATTENTION!
  2. # DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
  3. # FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
  4. # MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
  5. # FOLLOWING FILE(S):
  6. #/var/www/vhosts/domain.tld/conf/vhost.conf
  7. #/var/www/vhosts/domain.tld/subdomains/m/conf/vhost.conf
  8.  
  9. <VirtualHost 01.02.03.04:80>
  10.     ServerName "domain.tld:80"
  11.         ServerAlias  "www.domain.tld"
  12.         UseCanonicalName Off
  13.  
  14. <IfModule mod_suexec.c>
  15.     SuexecUserGroup "adminname" "psacln"
  16. </IfModule>
  17.  
  18.     ServerAdmin  "[email protected]"
  19.  
  20.         DocumentRoot "/var/www/vhosts/domain.tld/httpdocs"
  21.     CustomLog /var/www/vhosts/domain.tld/statistics/logs/access_log plesklog
  22.     ErrorLog  "/var/www/vhosts/domain.tld/statistics/logs/error_log"
  23.  
  24.  
  25.  
  26. <IfModule mod_userdir.c>
  27.     UserDir "/var/www/vhosts/domain.tld/web_users"
  28. </IfModule>
  29.  
  30.  
  31.  
  32.  
  33.     Alias  "/plesk-stat" "/var/www/vhosts/domain.tld/statistics"
  34.     <Location  /plesk-stat/>
  35.         Options +Indexes
  36.     </Location>
  37.     <Location  /plesk-stat/logs/>
  38.         Require valid-user
  39.     </Location>
  40.     Alias  /webstat /var/www/vhosts/domain.tld/statistics/webstat
  41.     Alias  /webstat-ssl /var/www/vhosts/domain.tld/statistics/webstat-ssl
  42.     Alias  /ftpstat /var/www/vhosts/domain.tld/statistics/ftpstat
  43.     Alias  /anon_ftpstat /var/www/vhosts/domain.tld/statistics/anon_ftpstat
  44.  
  45.     Alias  /awstats-icon /var/www/html/awstats/icon
  46.  
  47.  
  48.  
  49.     <IfModule mod_ssl.c>
  50.         SSLEngine off
  51.     </IfModule>
  52.  
  53.     <Directory /var/www/vhosts/domain.tld/httpdocs>
  54.  
  55. <IfModule mod_perl.c>
  56.     <Files ~ (\.pl$)>
  57.         SetHandler perl-script
  58.         PerlHandler ModPerl::Registry
  59.         Options ExecCGI
  60.         allow from all
  61.         PerlSendHeader On
  62.     </Files>
  63. </IfModule>
  64. <IfModule sapi_apache2.c>
  65. php_admin_flag engine on
  66. php_admin_flag safe_mode off
  67. php_admin_value open_basedir /var/www/vhosts/domain.tld/httpdocs/:/tmp/
  68. </IfModule>
  69.  
  70. <IfModule mod_php5.c>
  71. php_admin_flag engine on
  72. php_admin_flag safe_mode off
  73. php_admin_value open_basedir /var/www/vhosts/domain.tld/httpdocs/:/tmp/
  74. </IfModule>
  75. <IfModule mod_python.c>
  76.     <Files ~ (\.py$)>
  77.         SetHandler python-program
  78.         PythonHandler mod_python.cgihandler
  79.     </Files>
  80. </IfModule>
  81. <IfModule mod_fcgid.c>
  82.     <Files ~ (\.fcgi)>
  83.         SetHandler fcgid-script
  84.         Options +FollowSymLinks +ExecCGI
  85.     </Files>
  86. </IfModule>
  87.  
  88.  
  89.     Options +Includes -ExecCGI
  90.  
  91.     </Directory>
  92.  
  93.  
  94.     <Directory /var/www/vhosts/domain.tld/web_users>
  95.  
  96. <IfModule sapi_apache2.c>
  97. php_admin_flag engine off
  98. </IfModule>
  99.  
  100. <IfModule mod_php5.c>
  101. php_admin_flag engine off
  102. </IfModule>
  103.  
  104.     </Directory>
  105.  
  106.  
  107. <Directory "/var/www/vhosts/domain.tld/statistics">
  108.     AuthType Basic
  109.         AuthName "Domain statistics"
  110.         AuthUserFile "/var/www/vhosts/domain.tld/pd/d..httpdocs@plesk-stat"
  111.         require  valid-user
  112. </Directory>
  113. <Directory "/var/www/vhosts/domain.tld/statistics">
  114.     AuthType Basic
  115.         AuthName "Domain statistics"
  116.         AuthUserFile "/var/www/vhosts/domain.tld/pd/d..httpsdocs@plesk-stat"
  117.         require  valid-user
  118. </Directory>
  119. Alias "/error_docs" "/var/www/vhosts/domain.tld/error_docs"
  120. ErrorDocument 400 "/error_docs/bad_request.html"
  121. ErrorDocument 401 "/error_docs/unauthorized.html"
  122. ErrorDocument 403 "/error_docs/forbidden.html"
  123. ErrorDocument 404 "/error_docs/not_found.html"
  124. ErrorDocument 500 "/error_docs/internal_server_error.html"
  125. ErrorDocument 405 "/error_docs/method_not_allowed.html"
  126. ErrorDocument 406 "/error_docs/not_acceptable.html"
  127. ErrorDocument 407 "/error_docs/proxy_authentication_required.html"
  128. ErrorDocument 412 "/error_docs/precondition_failed.html"
  129. ErrorDocument 415 "/error_docs/unsupported_media_type.html"
  130. ErrorDocument 501 "/error_docs/not_implemented.html"
  131. ErrorDocument 502 "/error_docs/bad_gateway.html"
  132. ErrorDocument 503 "/error_docs/maintenance.html"
  133.        
  134.    
  135.     Include "/var/www/vhosts/domain.tld/conf/vhost.conf"
  136.  
  137. </VirtualHost>
  138.  
  139.  
  140. <VirtualHost 01.02.03.04:80>
  141.     ServerName "m.domain.tld:80"
  142.         UseCanonicalName Off
  143.  
  144. <IfModule mod_suexec.c>
  145.     SuexecUserGroup "adminname" "psacln"
  146. </IfModule>
  147.  
  148.     ServerAdmin  "[email protected]"
  149.  
  150.         DocumentRoot "/var/www/vhosts/domain.tld/m"
  151.     CustomLog /var/www/vhosts/domain.tld/statistics/logs/access_log plesklog
  152.     ErrorLog "/var/www/vhosts/domain.tld/statistics/logs/error_log"
  153.  
  154.  
  155.  
  156.  
  157.  
  158.     <IfModule mod_ssl.c>
  159.         SSLEngine off
  160.     </IfModule>
  161.  
  162.     <Directory /var/www/vhosts/domain.tld/m>
  163.  
  164. <IfModule mod_perl.c>
  165.     <Files ~ (\.pl$)>
  166.         SetHandler perl-script
  167.         PerlHandler ModPerl::Registry
  168.         Options ExecCGI
  169.         allow from all
  170.         PerlSendHeader On
  171.     </Files>
  172. </IfModule>
  173. <IfModule sapi_apache2.c>
  174. php_admin_flag engine on
  175. php_admin_flag safe_mode off
  176. php_admin_value open_basedir /var/www/vhosts/domain.tld/m/:/tmp/
  177. </IfModule>
  178.  
  179. <IfModule mod_php5.c>
  180. php_admin_flag engine on
  181. php_admin_flag safe_mode off
  182. php_admin_value open_basedir /var/www/vhosts/domain.tld/m/:/tmp/
  183. </IfModule>
  184. <IfModule mod_python.c>
  185.     <Files ~ (\.py$)>
  186.         SetHandler python-program
  187.         PythonHandler mod_python.cgihandler
  188.     </Files>
  189. </IfModule>
  190. <IfModule mod_fcgid.c>
  191.     <Files ~ (\.fcgi)>
  192.         SetHandler fcgid-script
  193.         Options +FollowSymLinks +ExecCGI
  194.     </Files>
  195. </IfModule>
  196.  
  197.  
  198.     Options +Includes -ExecCGI
  199.  
  200.     </Directory>
  201.  
  202. Alias "/error_docs" "/var/www/vhosts/domain.tld/error_docs"
  203. ErrorDocument 400 "/error_docs/bad_request.html"
  204. ErrorDocument 401 "/error_docs/unauthorized.html"
  205. ErrorDocument 403 "/error_docs/forbidden.html"
  206. ErrorDocument 404 "/error_docs/not_found.html"
  207. ErrorDocument 500 "/error_docs/internal_server_error.html"
  208. ErrorDocument 405 "/error_docs/method_not_allowed.html"
  209. ErrorDocument 406 "/error_docs/not_acceptable.html"
  210. ErrorDocument 407 "/error_docs/proxy_authentication_required.html"
  211. ErrorDocument 412 "/error_docs/precondition_failed.html"
  212. ErrorDocument 415 "/error_docs/unsupported_media_type.html"
  213. ErrorDocument 501 "/error_docs/not_implemented.html"
  214. ErrorDocument 502 "/error_docs/bad_gateway.html"
  215. ErrorDocument 503 "/error_docs/maintenance.html"
  216.  
  217.  
  218.  
  219. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment