FlarumChina - 官网

文档

Installation

Beta Software

请注意Flarum还是一个测试软件,那就意味着:

  • 她还有一些 没有实现的特性漏洞
  • 但这些迟早会被 解决!

安装环境

这有些东西需要被确认:

  • web 服务器: Apache (with mod_rewrite), Nginx, or Lighttpd
  • PHP 5.5+ 和这些扩展: mbstring, pdo_mysql, openssl, json, gd, dom, fileinfo
  • MySQL 5.5+

安装

下载地址: Github

首先设置 重写规则

重写规则

Apache

你只需安装即可,若出现问题请Apache设置中增加以下设定:

<Directory "/path/to/your/forum(网站根目录)">
    AllowOverride All
</Directory>

Nginx

更改你的Nginx设置,像以下的设置(listen和root需自己更改)

    server {
        listen  127.*.*.*:****;
        root    (完整的网站根目录);

        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";
            }
        }


    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)";

Lighttpd

Add the following lines to your server’s configuration block:

    url.rewrite-if-not-file = (
        "/admin.*" => "/admin.php",
        "/api.*"   => "/api.php",
        "/.*"      => "/index.php"
    )

设置SMTP

请到管理后台有图形化SMTP管理插件