1

I have a website with an index.php file (rhys.ddns.net/php/index.php). Whenever I try to access said file in my browser it is getting served as a download. I have checked my sites-enabled/default file and made changes suggested by others about exactly the same issue yet nothing is changing in behavior.

Server details: Raspberry Pi B+ [ Nginx/1.14.1 : PHP7.2-FPM ]

Here are my config files (they are hosted separately as I am experiencing problems with the StackOverflow codeblocks)

/etc/nginx/nginx.conf - http://termbin.com/bz0nf

/etc/nginx/sites-enabled/default - http://termbin.com/y4fk

/etc/php/7.2/fpm/php.ini - http://termbin.com/3jqj

/etc/php/7.2/fpm/pool.d/www.conf - http://termbin.com/wqm6

As always your help is appreciated and if U want me to post more files just comment :)

Rhys Perry
  • 11
  • 2
  • https://serverfault.com/questions/873286/nginx-trying-to-download-php-files ? – yagmoth555 Nov 28 '18 at 18:32
  • I'm sorry if I'm just being dumb but I don't understand what exactly the first link is asking me to do. – Rhys Perry Nov 28 '18 at 19:11
  • I pasted some possible duplicate, but as I'am not a expert on nginx, I can't really mark it directly as duplicate, but please look around, it's a problem I seen asked much already on serverfault – yagmoth555 Nov 28 '18 at 19:23
  • Thankyou @yagmoth555 your 1st link worked. You can write it in the answers section and I will approve it. – Rhys Perry Nov 28 '18 at 19:29
  • I will tag it as a duplicate then :), thanks you for the feedback – yagmoth555 Nov 28 '18 at 19:30

0 Answers0