-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A question about static file web page, Caddy only identify single web page named index.html? #5033
Comments
Thanks for opening an issue! I can't reproduce the behavior, it works for me. So I'll need your help to understand it better. Ideally, we need to be able to reproduce the bug in the most minimal way possible. This allows us to write regression tests to verify the fix is working. If we can't reproduce it, then you'll have to test our changes for us until it's fixed -- and then we can't add test cases, either. I've attached a template below that will help make this easier and faster! This will require some effort on your part -- please understand that we will be dedicating time to fix the bug you are reporting if you can just help us understand it and reproduce it easily. This template will ask for some information you've already provided; that's OK, just fill it out the best you can. 👍 I've also included some helpful tips below the template. Feel free to let me know if you have any questions! Thank you again for your report, we look forward to resolving it! Template
Instructions -- please heed otherwise we cannot help you (help us help you!)
Example of a tutorial: Create a config file: |
1. Environment1a. Operating system and version
1b. Caddy version (run
|
Thanks for the details! It still works for me... What is the output of And what are your logs if you enable debug mode?
And also please enable access logs, just put the log directive in your site block. And can you show a |
In my case. I put the bookmarks.html in
I have added some extra config in
when I input the command
The key error msg is below.
It shows that there is no index file in I modify the Caddyfile config below and input the command
But it still didn't work for me as index option can't change the The result of
In fact. As long as I can change the index_filenames list. The issue can be solved. Can you have any good tips? |
Btw, keep in mind that you'll need to |
Ok. I have added the hide option. I find that when I input the domain name Looking forward to hearing from you.❤️❤️❤️
|
Yeah I understand that doesn't solve your problem - I'm not at my computer currently, I'm on vacation so I'm just reading this from my phone, just wanted to point out that point about git. I hope Matt can figure out the problem 😅 |
Caddy isn't even seeing the updated config. Presumably it doesn't even know about your custom index filename. What's the error before that log? |
Now, it works. demo website. I don't figure out why didn't it take effect a few days ago. Maybe When I ran |
There was likely a syntax error in your Caddyfile so the command to apply changes didn't succeed. Always check for errors! Glad you got it working. |
This is my wrong Caddyfile config in /etc/caddy/Caddyfile
When I change the name of bookmarks.html to index.html and modify the caddy config below. It works.
How to custom the entry html file instead of using the default html file named index.html?
I don't find content in the documentation. Looking forwaring to hearing from you soon.❤️❤️❤️
https://caddyserver.com/docs/caddyfile/directives/file_server
The text was updated successfully, but these errors were encountered: