Grav with Apache shows php file instead of webpage

Hello, after installing grav on my debian server i was greeted with bare php code insteam od webpage and running index.php locally with php shows “PHP webserver requires a router to run Grav, please use” error. I saw a few posts indicating that php is incorretly installed however after many installs and reinstalls looks like that not the case. I would appriciate any help. Thanks in advance.