Hi, I'm having an issue with Nginx serving the index.php file in the Flarum public directory after install instead of actually running the PHP. In Google Chrome, this presents itself as downloading the index.php file to my local machine... I have no idea what could possibly be causing this. The server block is a bit of a mess (I've tried a lot of stuff) so apologies for that.
My server block:
server {
listen 80;
server_name forum.harieo.me;
#return 302 https://$server_name$request_uri;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
#listen [::]:443;
root /var/www/forum.harieo.me/public;
index index.php index.html index.htm;
server_name forum.harieo.me;
# SSL Configuration
ssl_certificate /etc/ssl/workingkey.pem;
ssl_certificate_key /etc/ssl/alsoworking.key;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2;
include /var/www/forum.harieo.me/.nginx.conf;
}
Does anyone know what this issue could be?
Edit: Issue seemed to be that the URI didn't direct you to the index.php file but instead just let you download it. If you go to <uri>/index.php it works until you attempt to install, where it completely breaks again.
Still not sure how to fix the problem, however...