Skip to content

Symbolic links returning 404 #312

Description

@sheen-justin

Running into an issue where symbolic links in a mounted volume are served as 404. The symlinks are created and exist on the container itself, but the tomcat server does not seem to serve them as normal files and instead returns 404.

Here's a quick way to replicate this behavior:

docker-compose.yml

services:
    test-symlink:
        container_name: test-symlink
        image: tomcat
        ports:
            - "8080:8080"
        volumes:
            - ./app:/usr/local/tomcat/webapps/app
mkdir app
touch app/real-file.txt
ln -s real-file.txt app/symlink.txt
docker compose up

http://localhost:8080/app/real-file.txt > returns 200
http://localhost:8080/app/symlink.txt > returns 404

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions