Hello guys, not sure but grav is generating some issues when I try run it with my caddy server, the error is
2016/10/18 16:16:35 /home/me/Descargas/grav-admin/webserver-configs/Caddyfile:9 - Parse error: Wrong argument count or unexpected line ending after ‘status’
the line 9 in the Caddyfile is
rewrite {
r /(.git|cache|bin|logs|backups|tests)/.*$
status 403 <---- this is the line 9
}
for me seems than this is a compatibility error between different caddy’s versions…I’m using the latest caddy server
:8080
gzip
fastcgi / 127.0.0.1:9000 php
# Begin - Security
# deny all direct access for these folders
rewrite {
if {path} match /(.git|cache|bin|logs|backups|tests)/.*$
to /forbidden
}
# deny running scripts inside core system folders
rewrite {
if {path} match /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$
to /forbidden
}
# deny running scripts inside user folder
rewrite {
if {path} match /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$
to /forbidden
}
# deny access to specific files in the root folder
rewrite {
if {path} match /(LICENSE.txt|composer.lock|composer.json|nginx.conf|web.config|htacce ss.txt|\.htaccess)
to /forbidden
}
## End - Security
# global rewrite should come last.
rewrite {
to {path} {path}/ /index.php?_url={uri}
}
Not really that familiar with Caddy. The configuration was user contributed. The configuration worked in prior version but now is broken in latest. I think @flaviocopes has made a request about format on the Caddy forum.
Not sure how 1.1.6 operates compared to previous few minor versions, but Caddy has changed fairly much since 0.8.x. It’s an excellent server for speed and simplicity - especially with Electron, so keeping an up-to-date example available would be handy.