Proxy to Ghost CMS but folder with PHP form inside

I run proxy directed to Ghost CMS which is NodeJS software. If I create a folder and put PHP contact form script file there, can I config Caddy someone with “file server” and php_fast cgi for that folder under Ghost proxy?

I would love to use mine php contact form script instead use cloud one.

example.com {
        import mustheaders
        import security
        reverse_proxy IP:2351 {
                import proxy
        }

        import logs
}