title: Spring boot run as java -jar with AJP setting not resolving Web calls via Apache. but API Calls are working
body: <p>The Spring boot when running with command Java -jar, only API calls are receiving through Apache, whereas when I hit Hope page URL(or any URL) from the browser, am getting 404. </p>
  
  <p>The following is in APache config (Bitnami server)</p>
  
  <pre><code>&lt;LocationMatch "^/(?!((server-status|phpmyadmin)([^a-zA-Z0-9]|$))).*$"&gt;
    ProxyPass ajp://localhost:8009
  &lt;/LocationMatch&gt;
  </code></pre>
  
  <p>For AJP, the below  code is added as configuration</p>
  
  <pre><code> @Bean
      public WebServerFactoryCustomizer&lt;TomcatServletWebServerFactory&gt; servletContainer() {
        return server -&gt; {
          if (server instanceof TomcatServletWebServerFactory) {
              ((TomcatServletWebServerFactory) server).addAdditionalTomcatConnectors(redirectConnector());
          }
        };
      }
  
      private Connector redirectConnector() {
         Connector connector = new Connector("AJP/1.3");
         connector.setScheme("http");
         connector.setPort(ajpPort);
         connector.setSecure(false);
         connector.setAllowTrace(false);
         return connector;
      }
  </code></pre>
  
  <p>Am is missing any ProxyPass setting in Apache? or am I missing anything in springboot?</p>