Sorry for the spam but I have been working non stop and figured it out.
This is how I configured the nginx for beta 8. I want multiple sites on the same server so I created a flarum.conf in the sites-available/ directory (located inside the nginx directory... in my case /etc/nginx/sites-available
).
The flarum.conf file looks like this:
server {
listen 80;
listen [::]:80;
root /var/www/flarum;
index index.php index.html index.htm;
server_name example.com www.example.com;
#add php suport (make sure you have php-fpm installed for it to work)
location ~* \.php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
include /var/www/flarum/.nginx.conf;
}
in my case I had installed the flarum inside the /var/www/flarum
but you can change that (the public folder with the index.ptp is inside the /var/www/flarum/public
i didn't touch it).
Then you have to link it to the sites-enabled/ folder with this command:
sudo ln -s /etc/nginx/sites-available/flarum.conf /etc/nginx/sites-enabled/
and then refresh nginx:
sudo service nginx restart
After that it should work 🙂