title: VirtualHosts not working (Mod_proxy, Proxmox)
body: <p>For starters I use Proxmox to virtualize several machines.
  Now I want my main machine to redirect the traffic accordingly based on the servername.
  I had the setup working once, but now somehow it won't work.</p>
  
  <p>my default host:</p>
  
  <p><strong>00_proxmox_domain_com.conf</strong></p>
  
  <pre><code>NameVirtualHost *:80
  &lt;VirtualHost *:80&gt;
  ServerName proxmox.domain.com
  ServerName *.proxmox.domain.com
  #RewriteLog "/root/rewrite.log"
  #RewriteLogLevel 10
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
  RewriteCond %{REQUEST_URI} !^/nrd/
  RewriteCond %{REQUEST_URI} !^/images/
  RewriteCond %{REQUEST_URI} !^/css/
  RewriteCond %{REQUEST_URI} !^/javascript/
  RewriteCond %{REQUEST_URI} !^/vncterm/
  RewriteCond %{REQUEST_URI} !^/.*\.js$
  RewriteCond %{REQUEST_URI} !^/login.pl$
  RewriteCond %{HTTP_HOST} ^proxmox\.domain\.com$
  RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [L,R]
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Then I have several similar virtualhost, (currently only this one is activated)
  This should send the visitor to PHPMyAdmin on virtual server with IP 192.168.1.13</p>
  
  <p><strong>02_pma_domain_com.conf</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerName pma.domain.com
  ServerName *.pma.domain.com
  
  ProxyRequests Off
  
  ProxyPreserveHost On
  
  &lt;Proxy *&gt;
      Order deny,allow
      Allow from all
  &lt;/Proxy&gt;
  
  ProxyPass / http://192.168.1.13/
  ProxyPassReverse / http://192.168.1.13/
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And there is the Proxmox virtual hostfile </p>
  
  <p><strong>pve.conf</strong></p>
  
  <pre><code>&lt;IfModule mpm_prefork_module&gt;
  StartServers 2
  MinSpareServers 1 
  MaxSpareServers 2
  MaxClients          50
  MaxRequestsPerChild 30
  &lt;/IfModule&gt;
  
    ServerName localhost
    ServerSignature Off
    ServerTokens Prod
    ServerAdmin root
    AddDefaultCharset On
  
    # Hint: Ajax use KeepAlive, which in effect disables MaxRequestsPerChild,
    # so we need to disable KeepAlive to prevent exhaustive memory usage, or
    # at least make sure that periodic updaters interval &gt; KeepAliveTimeout 
    KeepAlive Off
  
    DocumentRoot /usr/share/pve-manager/root
    &lt;Directory /&gt;
  Options FollowSymLinks
  AllowOverride None
    &lt;/Directory&gt;
  
    &lt;Directory /usr/share/pve-manager/root&gt;
  Options FollowSymLinks MultiViews
  AllowOverride None
  Order allow,deny
  allow from all
    &lt;/Directory&gt;
  
    ErrorLog /var/log/apache2/error.log
  
    LogLevel warn
  
    # do not log access to our ajax services
    SetEnvIf Request_URI "^/ws/" dontlog
  
    CustomLog /var/log/apache2/access.log combined env=!dontlog 
  
    Alias /images/  /usr/share/pve-manager/images/
    Alias /css/ /usr/share/pve-manager/css/
    Alias /javascript/ /usr/share/javascript/
    Alias /vncterm/ /usr/share/vncterm/
  
    # avoid authentication when accessing favicon
    Alias /favicon.ico /usr/share/pve-manager/images/favicon.ico
  
    PerlModule Embperl
    EMBPERL_SESSION_ARGS "config=DB_File Lock=Semaphore"
  
    AddType text/html .epl
  
    PerlRequire /usr/share/pve-manager/root/startup.pl
  
    PerlSetVar PVESatisfy any     
    PerlSetVar PVEPath /  
    PerlSetVar PVELoginScript /login.pl
  
    PerlTransHandler PVE::URLRewrite
  
    Alias /nrd/ /__no_real_dir__/
  
    &lt;Directory "/usr/share/pve-manager/root"&gt;
    AuthType PVE::AuthCookieHandler
    AuthName PVE
    PerlSetVar PVECookieName PVEAuthCookie
    #PerlSetVar AuthCookieDebug 5
  
    PerlAuthenHandler PVE::AuthCookieHandler-&gt;authenticate
    PerlAuthzHandler PVE::AuthCookieHandler-&gt;authorize
  
    require group root
  
    DirectoryIndex index.htm index.pl
  
    &lt;FilesMatch ".*\.htm$"&gt;
  EMBPERL_APPNAME PVE
      EMBPERL_SYNTAX EmbperlBlocks
      EMBPERL_OBJECT_BASE base.epl
  EMBPERL_INPUT_ESCMODE 0
  EMBPERL_ESCMODE 0
      SetHandler  perl-script
      PerlHandler Embperl::Object
      Options     ExecCGI
    &lt;/FilesMatch&gt;
    &lt;FilesMatch ".*\.epl$"&gt;
      Order allow,deny
      Deny From all
    &lt;/FilesMatch&gt;
    &lt;FilesMatch ".*\.pl$"&gt;
      SetHandler perl-script
  PerlHandler ModPerl::Registry
      Options +ExecCGI
    &lt;/FilesMatch&gt;
  
  &lt;/Directory&gt;
  
  &lt;Location /nrd/LOGIN&gt;
    AuthType PVE::AuthCookieHandler
    AuthName PVE
    PerlSetVar PVECookieName PVEAuthCookie
    #PerlSetVar AuthCookieDebug 5
    SetHandler perl-script
    PerlHandler PVE::AuthCookieHandler-&gt;login
  &lt;/Location&gt;
  
  &lt;Location /ws/&gt;
    SetHandler perl-script
    PerlHandler $PVE::HTMLServices::Obj-&gt;handler
  &lt;/Location&gt;
  
  &lt;VirtualHost *:443&gt;
  SSLEngine on
  SSLProtocol all -SSLv2
  SSLCertificateFile /etc/pve/pve-ssl.pem
  SSLCertificateKeyFile /etc/pve/pve-ssl.key
  
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>If you see an obvious error, please tell me.</p>
  
  <p>If you have a working install of proxmox it would help if you could give me your pve.conf
  And if you've got the virtualhosts working one of those files would be most welcome.</p>
  
  <p>I've tried several things to solve the problem, without any effect.</p>