Hi everyone.
I want to deploy flarum on a suburl of my website.
For example at www.example.com/forum.
I searched a lot but still i couldn't do that.
root /var/www/backend;
index index.php ;
location ~ ^/(api/|image/logo.png|cp|loginadmin|web/|assets|avatar.png) {
try_files $uri $uri/ /index.php?$query_string;
}
location ^~ /forum {
root /var/www/flarum2/public;
try_files $uri $uri/ /index.php?$query_string;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
include /var/www/flarum2/.nginx.conf;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
This is a part of my nginx config file.
Can anyone help ?