I am trying to set up Flarum in a subdirectory of Laravel. The installation went fine, but I have a few problems.
If I try to access admin panel -> NotFoundHttpException in RouteCollection.php line 161:
Notifications -> 404 Not Found GET GET http://axiom.app/forum/api/notifications
Make a discussion -> 404 Not Found POST http://axiom.app/forum/api/discussions
Running homestead with nginx. This is the configuration block
server {
listen 80;
listen 443 ssl;
server_name axiom.app;
root "/home/vagrant/Code/axiom/public;
index index.html index.htm index.php;
location /api { try_files $uri $uri/ /api.php?$query_string; }
location /admin { try_files $uri $uri/ /admin.php?$query_string; }
location /flarum {
deny all;
return 404;
}
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/axiom.app-error.log error;
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ~ /\.ht {
deny all;
}
location ~* .html$ {
expires -1;
}
location ~* \.(css|js|gif|jpe?g|png)$ {
expires 1M;
add_header Pragma [public](https://frontiertechnologyinstitute.com/python-programming-certification/);
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/plain
text/xml;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
ssl_certificate /etc/nginx/ssl/axiom.app.crt;
ssl_certificate_key /etc/nginx/ssl/axiom.app.key;
}
Any idea how to fix this? Thanks in advance