Page 1 of 1
Flarum
Posted: Tue Jul 26, 2016 6:21 pm
by insha
Hello, i have installed flarum
http://flarum.org/docs/installation/ on my domain
I use VestaCP with nginx php-fpm
Where to put exactly nginx in my nginx.conf file ?
Re: Flarum
Posted: Wed Jul 27, 2016 6:53 am
by skurudo
discuss.flarum.org don't say anything about this? ;-)
Re: Flarum
Posted: Wed Jul 27, 2016 6:56 am
by skurudo
Try to use this config and make changes for you or search with google something more suitable:
https://gist.github.com/novomirskoy/309 ... b2ffcf2611
PS: It's not tested by me.
Re: Flarum
Posted: Wed Jul 27, 2016 6:59 am
by skurudo
Hmmm
On Flarum site is config section for nginx:
http://flarum.org/docs/installation/
Code: Select all
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 /flarum {
deny all;
return 404;
}
location ~* \.php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-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";
}
Re: Flarum
Posted: Tue Sep 24, 2019 6:59 pm
by saosangmo
In the .conf of your vhost, you only change 2 places:
1. at the line
Code: Select all
root /home/vip/web/vipsedan.vn/public_html;
change to
Code: Select all
root /home/vip/web/vipsedan.vn/public_html/public;
....
2. at the line
change to
Code: Select all
location / {
try_files $uri $uri/ /index.php?$query_string;
Hope it help you!
Re: Flarum
Posted: Sat Oct 12, 2019 6:05 pm
by SanTi
How can I do it if I want to install flarum to public_html/forum/public ?
Wordpress is installed before and I install flarum to forum subfolder. I guess that I get error if I change nginx file's root line.
Re: Flarum
Posted: Sat Oct 12, 2019 9:26 pm
by SanTi
saosangmo wrote: ↑Tue Sep 24, 2019 6:59 pm
In the .conf of your vhost, you only change 2 places:
1. at the line
Code: Select all
root /home/vip/web/vipsedan.vn/public_html;
change to
Code: Select all
root /home/vip/web/vipsedan.vn/public_html/public;
....
2. at the line
change to
Code: Select all
location / {
try_files $uri $uri/ /index.php?$query_string;
Hope it help you!
Sorry but it does not work for me : (