Need help with try files

1. The problem I’m having:

Some of the pages I want to access just show failed. even if I use try_files.

For example
in my directory root I have the files
docs/Terraform/naming-convention/index.html
en/docs/Terraform/naming-convention/index.html

Accessing to
https://localhost/en/docs/Terraform/naming-convention FAILED
https://localhost/docs/Terraform/naming-convention WORKS

2. Error messages and/or full log output:

3. Caddy version:

4. How I installed and ran Caddy:

Installing and running using docker, I use the docker image caddy:2-alpine

a. System environment:

Docker

b. Command:

docker run ...

c. Service/unit/compose file:

d. My complete Caddy config:

{$DOCUSAURUS_DOMAIN:localhost} {
  root * /var/docusaurus
  encode gzip
  try_files {path} /index.html
  file_server
}

5. Links to relevant resources:

What do you mean by “failed”? Enable the debug global option. Show your logs. Show example requests with curl -v. Show evidence. Completely fill out the help topic template as per the forum rules. Don’t skip any section. Since you’re running in Docker, show how you run Caddy (docker-compose.yml or whatever).

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.