title: Create an alias for port
body: <p>I really don't know how to solve this problem. I need to load page <a href="http://domain.com:12345/" rel="nofollow">http://domain.com:12345/</a> on  address <a href="http://sub.domain.com/" rel="nofollow">http://sub.domain.com/</a>. </p>
  
  <p>How should I set VirtualHost or Alias on Apache, when I have only one IP address?</p>
  
  <p>Thanks very much.</p>
  
  <hr>
  
  <p>Now I have just this:</p>
  
  <p>ports.conf:</p>
  
  <pre><code>NameVirtualHost domain.com:80
  NameVirtualHost sub.domain.com:80
  Listen *:80
  
  &lt;IfModule mod_ssl.c&gt;
      Listen *:443
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_gnutls.c&gt;
      Listen *:443
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>.../sites-available/default:</p>
  
  <pre><code>&lt;VirtualHost domain.com:80&gt;
          ServerAdmin admin@domain.com
          ServerName domain.com
          DocumentRoot /var/www
          ...
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost sub.domain.com:80&gt;
          ServerAdmin admin@domain.com
          ServerName sub.domain.com
          ProxyPass / http://www.domain.com:12345/
          ProxyPassReverse / http://www.domain.com:12345/
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>But this doesn't work. sub.domain.com returns 500 Internal server error.</p>