# Crawlie PHP backend — Apache configuration.
# Nginx users: PATH_INFO isn't parsed by Nginx's default PHP-FPM config, so
# api/index.php's /posts routing needs a fastcgi_split_path_info rule added
# to your server block — search "nginx PATH_INFO php-fpm" for your distro's
# exact syntax, or ask your host's support to add it for this directory.

# Never serve config.php's contents directly, even if something is
# misconfigured upstream (belt-and-braces — PHP files are normally executed,
# never returned as plain text, but this costs nothing to have as a backstop).
<Files "config.php">
  Require all denied
</Files>

<Files "schema.sql">
  Require all denied
</Files>

# Allow PATH_INFO (e.g. api/index.php/posts/my-slug) — on by default on most
# hosts, set explicitly here in case yours has it turned off.
AcceptPathInfo On
