How to install MentionBB with Git on Plesk panel and Nginx settings.
- Document Root should be
httpdocs/public
. Mention usespublic
path as the main directory, if you specify root directory there are sensitive files in this section. It should bepublic
.
- You can choose the latest PHP version. MentionBB takes a very sensitive approach in this regard, we build according to the latest technologies.
FPM application served by Nginx
should be selected for Nginx.
- Disabled
Proxy Mode
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Access-Control-Max-Age' 1728000 always;
add_header 'Content-Type' 'text/plain; charset=utf-8' always;
add_header 'Content-Length' 0 always;
return 204;
}
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
location ~ \.php$ {
return 404;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
include /etc/nginx/mime.types;
include /var/www/vhosts/mentionbb.com/httpdocs/.nginx.conf;
You need to edit the code in the last line.
include /var/www/vhosts/mentionbb.com/httpdocs/.nginx.conf;
You should edit the mentionbb.com
part according to your own virtual host path.
- Repository name is
your choice
- Repo Url is
https://github.com/mentionbb/mentionbb.git
- Then you need set
Mode
toDeveloper Mode
.
- And click
Install
.
- Go to
src
folder. - Simply extract
vendor.zip
same directory.
After this step, you should import the db.sql
file in the root directory and write the information in .env.example
and then rename to .env
.
Or Command-line
php bin/console mention:install-db [--dbadapter DBADAPTER] [--user USER] [--password PASSWORD] [--dbname DBNAME] [--dbhost DBHOST]
*Excluding square brackets