Help needed for nginx rewrite to caddy

Still doesn’t work. https://example.com returns 404.

Updated config:

example.com {
        
        root * /var/www/example.com/public/
        php_fastcgi unix//dev/shm/php-cgi.sock {
                try_files {path} index.php?s={uri}
        }
        file_server
        
        # import httpcats

        log {
                output file /var/log/caddy/example.com.log
        }
        
}

*domain name reserved