Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 3.78 KB  |  hits: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. VirtualHosts not working (Mod_proxy, Proxmox)
  2. NameVirtualHost *:80
  3. <VirtualHost *:80>
  4. ServerName proxmox.domain.com
  5. ServerName *.proxmox.domain.com
  6. #RewriteLog "/root/rewrite.log"
  7. #RewriteLogLevel 10
  8. RewriteEngine on
  9. RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  10. RewriteRule .* - [F]
  11. RewriteCond %{REQUEST_URI} !^/nrd/
  12. RewriteCond %{REQUEST_URI} !^/images/
  13. RewriteCond %{REQUEST_URI} !^/css/
  14. RewriteCond %{REQUEST_URI} !^/javascript/
  15. RewriteCond %{REQUEST_URI} !^/vncterm/
  16. RewriteCond %{REQUEST_URI} !^/.*.js$
  17. RewriteCond %{REQUEST_URI} !^/login.pl$
  18. RewriteCond %{HTTP_HOST} ^proxmox.domain.com$
  19. RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [L,R]
  20. </VirtualHost>
  21.        
  22. <VirtualHost *:80>
  23. ServerName pma.domain.com
  24. ServerName *.pma.domain.com
  25.  
  26. ProxyRequests Off
  27.  
  28. ProxyPreserveHost On
  29.  
  30. <Proxy *>
  31.     Order deny,allow
  32.     Allow from all
  33. </Proxy>
  34.  
  35. ProxyPass / http://192.168.1.13/
  36. ProxyPassReverse / http://192.168.1.13/
  37. </VirtualHost>
  38.        
  39. <IfModule mpm_prefork_module>
  40. StartServers 2
  41. MinSpareServers 1
  42. MaxSpareServers 2
  43. MaxClients          50
  44. MaxRequestsPerChild 30
  45. </IfModule>
  46.  
  47.   ServerName localhost
  48.   ServerSignature Off
  49.   ServerTokens Prod
  50.   ServerAdmin root
  51.   AddDefaultCharset On
  52.  
  53.   # Hint: Ajax use KeepAlive, which in effect disables MaxRequestsPerChild,
  54.   # so we need to disable KeepAlive to prevent exhaustive memory usage, or
  55.   # at least make sure that periodic updaters interval > KeepAliveTimeout
  56.   KeepAlive Off
  57.  
  58.   DocumentRoot /usr/share/pve-manager/root
  59.   <Directory />
  60. Options FollowSymLinks
  61. AllowOverride None
  62.   </Directory>
  63.  
  64.   <Directory /usr/share/pve-manager/root>
  65. Options FollowSymLinks MultiViews
  66. AllowOverride None
  67. Order allow,deny
  68. allow from all
  69.   </Directory>
  70.  
  71.   ErrorLog /var/log/apache2/error.log
  72.  
  73.   LogLevel warn
  74.  
  75.   # do not log access to our ajax services
  76.   SetEnvIf Request_URI "^/ws/" dontlog
  77.  
  78.   CustomLog /var/log/apache2/access.log combined env=!dontlog
  79.  
  80.   Alias /images/  /usr/share/pve-manager/images/
  81.   Alias /css/ /usr/share/pve-manager/css/
  82.   Alias /javascript/ /usr/share/javascript/
  83.   Alias /vncterm/ /usr/share/vncterm/
  84.  
  85.   # avoid authentication when accessing favicon
  86.   Alias /favicon.ico /usr/share/pve-manager/images/favicon.ico
  87.  
  88.   PerlModule Embperl
  89.   EMBPERL_SESSION_ARGS "config=DB_File Lock=Semaphore"
  90.  
  91.   AddType text/html .epl
  92.  
  93.   PerlRequire /usr/share/pve-manager/root/startup.pl
  94.  
  95.   PerlSetVar PVESatisfy any    
  96.   PerlSetVar PVEPath /  
  97.   PerlSetVar PVELoginScript /login.pl
  98.  
  99.   PerlTransHandler PVE::URLRewrite
  100.  
  101.   Alias /nrd/ /__no_real_dir__/
  102.  
  103.   <Directory "/usr/share/pve-manager/root">
  104.   AuthType PVE::AuthCookieHandler
  105.   AuthName PVE
  106.   PerlSetVar PVECookieName PVEAuthCookie
  107.   #PerlSetVar AuthCookieDebug 5
  108.  
  109.   PerlAuthenHandler PVE::AuthCookieHandler->authenticate
  110.   PerlAuthzHandler PVE::AuthCookieHandler->authorize
  111.  
  112.   require group root
  113.  
  114.   DirectoryIndex index.htm index.pl
  115.  
  116.   <FilesMatch ".*.htm$">
  117. EMBPERL_APPNAME PVE
  118.     EMBPERL_SYNTAX EmbperlBlocks
  119.     EMBPERL_OBJECT_BASE base.epl
  120. EMBPERL_INPUT_ESCMODE 0
  121. EMBPERL_ESCMODE 0
  122.     SetHandler  perl-script
  123.     PerlHandler Embperl::Object
  124.     Options     ExecCGI
  125.   </FilesMatch>
  126.   <FilesMatch ".*.epl$">
  127.     Order allow,deny
  128.     Deny From all
  129.   </FilesMatch>
  130.   <FilesMatch ".*.pl$">
  131.     SetHandler perl-script
  132. PerlHandler ModPerl::Registry
  133.     Options +ExecCGI
  134.   </FilesMatch>
  135.  
  136. </Directory>
  137.  
  138. <Location /nrd/LOGIN>
  139.   AuthType PVE::AuthCookieHandler
  140.   AuthName PVE
  141.   PerlSetVar PVECookieName PVEAuthCookie
  142.   #PerlSetVar AuthCookieDebug 5
  143.   SetHandler perl-script
  144.   PerlHandler PVE::AuthCookieHandler->login
  145. </Location>
  146.  
  147. <Location /ws/>
  148.   SetHandler perl-script
  149.   PerlHandler $PVE::HTMLServices::Obj->handler
  150. </Location>
  151.  
  152. <VirtualHost *:443>
  153. SSLEngine on
  154. SSLProtocol all -SSLv2
  155. SSLCertificateFile /etc/pve/pve-ssl.pem
  156. SSLCertificateKeyFile /etc/pve/pve-ssl.key
  157.  
  158. RewriteEngine on
  159. RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  160. RewriteRule .* - [F]
  161.  
  162. </VirtualHost>