1

This question already has an answer here:

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 :)

marked as duplicate by Richard Smith, yagmoth555 Nov 28 '18 at 19:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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