title: Spring Boot Project work with Apache Http Server
body: <p>I have two project that write with spring boot, and have separate port number.</p>
  
  <pre><code>server.port: 23100
  server.port: 23101
  </code></pre>
  
  <p>now, I want to deploy the two project into one server and shard the same port 80,
  How should I do to support this case ?</p>
  
  <p>I know it can use Apache Http Server to support PHP etc. how to do this will Spring Boot ?</p>
  
  <h1>Update</h1>
  
  <p>thanks @HeadBangingSloth give this solution, general idea is to redirect 80 port  to local port number according to domain name.</p>
  
  <ul>
  <li>create <strong>vhost.conf</strong> file in <strong>/etc/httpd/conf.d/</strong> folder</li>
  <li>add following content according to your real case.</li>
  <li>restart http server via <strong>service httpd restart</strong>
  <code>
  &lt;VirtualHost *:80&gt;
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName www.app1.com
  ServerAlias app1.com
  ProxyPass / http://localhost:23100/
  ProxyPassReverse / http://localhost:23100/
  &lt;/VirtualHost&gt; 
  &lt;VirtualHost *:80&gt;
  ProxyPreserveHost On
  ProxyRequests Off
  ServerName www.app2.com
  ServerAlias app2.com
  ProxyPass / http://localhost:23101/
  ProxyPassReverse / http://localhost:23101/
  &lt;/VirtualHost&gt;
  </code></li>
  </ul>