hakanoktay
(Hakanoktay)
1
1. Caddy version (caddy version
):
Caddy v2.2.1
2. How I run Caddy:
sudo systemctl start caddy
a. System environment:
ubuntu 18.04
d. My complete Caddyfile or JSON config:
www.domain.tdl {
root * /path/to/www
file_server
}
3. The problem I’m having:
Hi, i want to serve my index.html but domain giving HTTP ERROR 404 error
thank you
pwhodges
(Paul Hodges)
2
Does Caddy running as a service have read access to that file? Does it work if you run Caddy from the command line?
Paul
1 Like
hakanoktay
(Hakanoktay)
3
-Does Caddy running as a service have read access to that file?
-Yes
-Does it work if you run Caddy from the command line?
-Yes, Caddy’s status active
When i put json its work well but if Caddyfile i got error
-Working json file bellow
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"@id": "3-domain",
"handle": [
{
"handler": "file_server",
"root": "/path/to/www"
}
],
"match": [
{
"host": [
"www.domain.tdl"
]
}
],
"terminal": true
}
]
}
}
}
}
}
hakanoktay
(Hakanoktay)
4
Hi pwhodges,
I doubted after what you wrote. i add caddy user to www-data group which is directory of domains.
sudo adduser caddy www-data
its working now. thank you
1 Like
system
(system)
Closed
5
This topic was automatically closed after 30 days. New replies are no longer allowed.