0

I have my virtual host set up like this:

<VirtualHost *:80>
        DocumentRoot /var/www/example
        <Directory /var/www/example>
                DirectoryIndex index.html
                Options Indexes FollowSymLinks
                AllowOverride None
                Require all granted
        </Directory>
        # Static files in the examples webapp are served by Apache
        Alias /Example /opt/tomcat/webapps/Example
        # All requests go to ajp13_worker by default
        JkMount /Example/* ajp13_worker
        # Serve this files using Apache
        JkUnMount /Example/*.html ajp13_worker
        JkUnMount /Example/*.jpg ajp13_worker
        JkUnMount /Example/*.gif ajp13_worker
        JkUnMount /Example/*.png ajp13_worker
        JkUnMount /Example/*.svg ajp13_worker
        JkUnMount /Example/*.js ajp13_worker
...
</VirtualHost>

I works in the way that apache serves the static files as defined above, but whenever I do REST API requests to tomcat or try to access servlets in tomct I get 404 error from apache. Why?

I can access ALL rest apis and servlets from localhost:8080/.. but not from localhost/..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.