Shad0w Shad0w - 11 months ago 58
PHP Question

Nginx doesn't execute PHP

I really need help with Nginx on my Ubuntu Server. I set up Nginx normally and everything works so far. That means if I put an index.html into

it works just fine.

But now I wanted to install phpBB there. I followed the tutorial and extracted it in the
folder. I got a folder called "phpBB3" so I went to my browser to as the tutorial said.

But the PHP did not execute. It tried to download an
file. I opened the file in notepad and it turned out to be the PHP script.

I have no idea what to do. Yes, PHP is installed and yes, I looked on google and StackOverflow and followed the instructions. But nothing seemed to help. So please don't just mark this as duplicate and post a link to another StackOverflow question. Because I already tried that and it won't really help me.

My configs are as follows:



This is really important to me, thank you!

Answer Source

Ok I found out why it didn't work. The thing is I have two configs in the sites-aviable directory. First one is "default" and second one is "". I appied all changes to the "default" config while I left the "" config untouched. And that was the problem. I had to apply all changes to the "" config aswell.