The first time I installed this I followed the instructions on https://flarum.org/docs/installation/
I created a database "flarium" and a mysql user and password.
I add the nginx config supplied on that page and I end up with the following nginx config.
server {
listen 80;
# ipv6only causes major major restart issues
listen [::]:80; # ipv6only=on;
server_name forum.spiritual-archeology.space;
gzip on;
gzip_types text/plain text/javascript application/x-javascript application/xml application/javascript text/css;
root /usr/share/nginx/html/forum.spiritual-archeology.space/;
include acme_challenge.conf;
error_log /var/log/nginx/forum.spiritual-archeology.space.error.log;
access_log /var/log/nginx/forum.spiritual-archeology.space.access.log combined;
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; }
location ~* ^/(composer\.(json|lock)|config\.php|flarum|storage|vendor) {
deny all;
return 404;
}
location ~* \.php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY ""; # Fix for https://httpoxy.org/ vulnerability
fastcgi_index index.php;
}
location ~* \.html$ {
expires -1;
}
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 1M;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# 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)";
}
My config.php file is:
<?php return array (
'debug' => true,
'database' =>
array (
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'flarum',
'username' => '<snip>',
'password' => '<snip>',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => 'fla_',
'port' => '3306',
'strict' => false,
),
'url' => 'http://forum.spiritual-archeology.space',
'paths' =>
array (
'api' => 'api',
'admin' => 'admin',
),
);
First time I installed I got the error "Something went wrong while trying to load the full version of the site".
Now I just get 404 errors
also the logs from nginx logs (rather long) I added to this pastebin
https://paste.ubuntu.com/p/4CXRd7zPvK/
Surely my experience is unique and first time installs dont go this horribly wrong. Is there a step I missed.
I also checked file permissions and I set file ownership to www-data for all the files.
Any ideas?