本帖最后由 houzhenhong 于 2017-1-31 20:59 编辑
FlarumChina
Flarum 是一款优雅简洁论坛软件,让在线交流变得更加轻松愉快。
基于 PHP 构建,界面使用 Mithril 构建,Mithril 是一个高性能的 JavaScript 框架。
如果你想拥有一个请点击了解详情
若你还没有感受到Flarum的优美请访问特点来了解
前言VPS面板有效的避免了枯燥的黑底白字的命令,作为习惯Windows的人的来说不失为一个过渡方案,但由大部分的面板都不支持Fileinfo,导致FlarumChina无法安装。今天介绍宝塔面板来解决这个问题!
准备安装:1、将数据盘挂载到/www目录
2、确保没有安装其它环境包
3、暂时只对 CentOS 5.x / 6.x / 7.x 提供支持
安装命令:
- yum -y install screen wget && screen -S bt
复制代码- wget -O install.sh http://125.88.182.172:5880/src/install.sh && sed -i 's/--disable-fileinfo/--enable-fileinfo/g' install.sh && sh install.sh
复制代码
若不需要fileinfo请使用以下命令(将无法安装Flarum) - yum -y install screen wget && screen -S bt
复制代码- wget -O install.sh http://125.88.182.172:5880/src/install.sh && sh install.sh
复制代码
适合全新的linux服务器使用,已经装有其他环境的Linux服务器请勿安装。 若您在安装过程中SSH中断,重新连接后,无需重新安装,输入 screen -r bt 即可恢复之前的安装过程
伪静态
在网站-操作-修改-伪静态-Defaut填入以下配置- location / {
- index index.php index.html index.htm;
- try_files $uri $uri/ /index.php?$query_string;
- }
- location ~ .php$ {
- fastcgi_split_path_info ^(.+.php)(/.+)$;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_index index.php;
- include fastcgi_params;
- }
- 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 ~* \.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";
- }
复制代码
原帖地址http://discuss.flarum.ga/d/118 |