Search code examples
phpubuntunginxphpbbphpbb3

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 /var/www/mydomain.com/public_html it works just fine.

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

But the PHP did not execute. It tried to download an "application/octet-stream" 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:

/etc/nginx/sites-available/default http://pastebin.com/rUbHybDD

/etc/php5/fpm/php.ini http://pastebin.com/HeynV4Je

This is really important to me, thank you!


Solution

  • 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 "mydomain.com". I appied all changes to the "default" config while I left the "mydomain.com" config untouched. And that was the problem. I had to apply all changes to the "mydomain.com" config aswell.