by Matteo Scaramuccia.
Hi Carolynn,
why not removing Apache and let PHP-FPM, installed where Apache is running now, collaborate w/ nginx to serve your Moodle instance?
I mean: https://docs.moodle.org/34/en/Nginx . Unless you're using X-Sendfile, https://docs.moodle.org/34/en/Performance_recommendations#X-Sendfile .
BTW, you need to expose your public hostname in $CFG->wwwroot and use $CFG->reverseproxy = true; and avoid the trailing slash in both location and proxy_pass.
Note: 303 is the HTTP Status used by Moodle to redirect to the login page. When changing the configuration, please purge all caches, hopefully the /cache and /localcache folders in the moodle data folder ($CFG->dataroot) if you don't use any other cache store; otherwise, use the CLI, https://docs.moodle.org/34/en/Administration_via_command_line#Purge_caches .
HTH,
Matteo