Skip to content
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

Suggestion: Give caddy a default welcome page like "Caddy works!" #100

Closed
bigwhite opened this issue Jun 3, 2015 · 5 comments
Closed

Suggestion: Give caddy a default welcome page like "Caddy works!" #100

bigwhite opened this issue Jun 3, 2015 · 5 comments
Labels
declined 🚫 Not a fit for this project feature ⚙️ New feature or request

Comments

@bigwhite
Copy link

bigwhite commented Jun 3, 2015

hi,
when I first download caddy install package, unzip it, and execute "./caddy", it works. but when opening "localhost:2015", it display "404 not found " in my browser . This is not a good experience for caddy beginner. I suggest to give a default welcome page like "caddy works!" , just like apache2。

@bigwhite bigwhite changed the title why not give caddy a default welcome page like "Caddy works!" Suggestion: Give caddy a default welcome page like "Caddy works!" Jun 3, 2015
@abiosoft
Copy link

abiosoft commented Jun 3, 2015

Thanks, I thought of this as well. It is not a difficult task and we will work on it.

However, if you think you want to help us with this, feel free.

@abiosoft
Copy link

abiosoft commented Jun 3, 2015

After having a second thought on this, I do not think this PR (#101) is needed. Apologies.

As Caddy grows, we will eventually have setup scripts that will create default configurations and do other things like putting caddy in path and installing it as a service.

@mholt mholt added the feature ⚙️ New feature or request label Jun 3, 2015
@mholt
Copy link
Member

mholt commented Jun 3, 2015

Tony, thanks for your comments (and your pull request). I can see why a 404 message isn't the friendliest thing for beginners, so thanks for pointing that out.

I've given it some careful consideration and I think we should leave this as-is.

The fact that a 404 message appears already indicates that the server is responding to requests at that host and port, so it is working. I also don't think we need follow the footsteps of Apache, since Caddy works differently. When Apache shows you the default "Apache works" page, it means you haven't yet configured it. Caddy, however, needs no configuration, so showing a "Caddy works" page is more likely to cover up a misconfiguration rather than point out a lack of configuration.

If I run Caddy from my site's folder, then load my browser and see "Caddy works," I'll immediately be confused because my homepage should be on the screen instead, leading me to think that Caddy doesn't work - and I'll be even less informed to fix the problem, which is that my index.html file was actually named imdex.html by accident.

There's also the case where the site owner may want to show a 404 at the site root. The troubling thing about the PR is that there is no way to configure or disable the default page. With the PR, there is no way for the site owner to turn off the page at "/", even by deleting all the files. When this is intentional by the site owner, showing a "Your web server works" page to visitors is kind of embarrassing, because again, it implies a lack of configuration on the sysadmin's part.

I hope that this makes sense. Again, thanks for your feedback and taking the initiative to open a PR!

How about this instead: We could update the "Getting Started" page to explain that if you see 404 Not Found, then you need to place an index.html file in that directory.

@mholt mholt added the declined 🚫 Not a fit for this project label Jun 3, 2015
@bigwhite
Copy link
Author

bigwhite commented Jun 4, 2015

Thanks for all comments for my issue and pr. caddy is a really easy to use. I will go on to focus the dev of caddy. Explanation in "getting started" page is a not bad idea, but I am still looking forward to a better solution for this in the future. we all hope caddy become better and better.

@mholt
Copy link
Member

mholt commented Jun 4, 2015

👍 Definitely looking forward to your help!

I just made the change to the Getting Started page - it will go out with the next site deploy. I will close this issue, but have it noted for future consideration. Thanks!

@mholt mholt closed this as completed Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined 🚫 Not a fit for this project feature ⚙️ New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants