PHP manual installation on offline Redhat9

I have Radhat 9.4 that doesn’t connected to the internet. the machine was installed with apache by dnf command “dnf install httpd”, and have internal repository that contains PHP 8.0/
Now I need to install PHP 8.2/3 and I copied the tar.gz installtion and run it withe ./configuration, but Apache still doesnt support PHP.
I noticed that apache try to run php-fpm and I tried to run it from the CLI, and I received an Error “failed to open configuration file ‘/usr/local/etc/php-fpm.conf’. Itried to copy the conf from PHP8.0 but no luck.
What steps should I take to install php on apache on an offline linux machine? I can download and copy packages to this machine.
Thank you very much