title: CSS & images breaking after mapping application deployed on Tomcat to my domain
body: <p>I've installed Tomcat 9.0.27 on my Digital Ocean droplet running Ubuntu 18.04.3.
  I deployed my Java WAR on Tomcat and am able to access it on the URL: 
  <code>http://example.com:8080/app_name</code><br>
  I want to be able to directly access my WAR serving JSP through my domain. 
  So, when I hit <code>example.com</code> it directly serves my Java application. </p>
  
  <p>I have tried several links to do the same. According to one of them (<a href="https://www.digitalocean.com/community/questions/how-to-tie-domain-name-with-application-running-on-tomcat" rel="nofollow noreferrer">https://www.digitalocean.com/community/questions/how-to-tie-domain-name-with-application-running-on-tomcat</a>), I did the following steps:<br>
  1. Enabled "proxy" and "proxy_http" using <code>a2enmod</code><br>
  2. Restarted Apache2 service using <code>systemctl restart</code><br>
  3. Created a new virtual host in a file named /etc/apache2/sites-available/tomcat.conf with the following contents:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName www.example.com
  
      ProxyRequests On
      ProxyPass / http://localhost:8080/app_name/
      ProxyPassReverse / http://localhost:8080/app_name/
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <ol start="4">
  <li>Enabled 'tomcat' site using a2ensite</li>
  <li>Restarted Apache2 service using <code>systemctl restart</code></li>
  </ol>
  
  <p>Now when I hit <code>example.com</code> it does serve my homepage but all the CSS styles and images seem to be broken. The hyperlinks also don't work anymore. 
  My application is still being served at <code>example.com:8080/app_name</code> and on this URL everything works perfectly. </p>
  
  <p>Please help me out with this. </p>