2018/02/27 22:08:15 [error] 2116#2116: *20 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'Flarum\Forum\Server' not found in /var/www/flarum/index.php:14
I am running php 7.1 and the latest release of flarum. By any chance anybody has experienced this before? Thanks for helping!
Here is my /etc/nginx/sites-available/default
server {
listen 80;
server_name my-ip;
root /var/www/flarum;
index index.php index.html index.htm;
# security config
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
fastcgi_hide_header X-Powered-By;
server_tokens off;
# gizp config
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types application/atom+xml
application/javascript
application/json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
#text/html -- text/html is gzipped by default by nginx
text/plain
text/xml;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# php config
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param HTTP_MOD_REWRITE On;
}
# url rewrite
location / { try_files $uri $uri/ /index.php?$query_string; }
location /api { try_files $uri $uri/ /api.php?$query_string; }
location /admin { try_files $uri $uri/ /admin.php?$query_string; }
# expires config
location ~* \.html$ {
expires -1;
}
location ~* \.(?:ico|css|js|gif|bmp|jpe?g|mp4|pdf|mp3|png|svg|ttf|woff|woff2|otf|eot)$ {
access_log off;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
}
# deny control
location /flarum {
deny all;
return 404;
}
location ~ /assets/.*\.(php)?$ {
deny all;
}
}