PHP issues with new server

ساخت وبلاگ
I just setup a new clean Ubuntu 22.04 VPS with installed DirectAdmin, configured the primary/only domain and published a website. HTML pages of the site work fine, but php pages are downloaded by the browser instead of loaded and executed.

DirectAdmin is configured with nginx_apache. I first tried several versions of php-fpm, 8.1 and 8.2 would partially load the php pages of the site, and 8.3 seemed to work fine, the pages fully loaded as expected. However, beyond the main php page, the site utilizes link rewrites to generate "pretty" URLs to sub-pages which are php. I figured out that php-fpm doesn't support .htaccess. I reconfigured PHP to use fastcgi, tried both 8.3 and 7.4 (current server hosting the site is 7.4), but both of those options result in the php pages downloading as files instead of loading/executing. I've enabled htscanner in CustomBuild, ran ./build for php and php_htscanner2, ran rewrite_confs from CLI and CustomBuild, restarted apache and nginx, tried toggling php_ini (current/default = "no") and secure_php (current/default = "yes") options in CustomBuild and so far I'm getting nowhere.

I will also need to host WordPress sites on this server, but one step at a time for now.

Any help would be greatly appreciated.

DirectAdmin Forums...
ما را در سایت DirectAdmin Forums دنبال می کنید

برچسب : نویسنده : ایمان اصلاحی directadmin بازدید : 29 تاريخ : يکشنبه 29 بهمن 1402 ساعت: 4:06