当前位置:网站首页>Hi, my technology forum is online!
Hi, my technology forum is online!
2022-06-29 04:17:00 【Official account: Yunyuan ecosystem】
Last weekend , Put your own Personal blog site [1] launched , What you are interested in can Favorites and subscriptions Ha , Future learning articles will be synchronized here for the first time :https://devopsman.cn
Many experienced gods can see here at a glance wordpress It's done , Used before hugo and Hexo, But how to say , Not very satisfied , So before meeting a satisfactory topic , Use this for the time being .
Toss and turn on the weekend WordPress after , I found that his message function looks very weak , For example, when writing some notes , An article can't be finished , However, comments can only be discussed under a certain article , After a long time like this Not conducive to learning and retrieval . But the forum can start a discussion on a topic at any time , So I found flarum 了 .
It is used to record and provide a place for everyone to discuss technical problems online , The main reason is that I like his simplicity 、 Refreshing , The most important thing is the timeline of his communication area , As follows :
Construction background
It is convenient to discuss a technical topic . Convenient retrieval . After all QQ Group 、 Wechat groups are mostly blowing water , It is also not conducive to information induction and retrieval . Everyone knows ...
Manual installation
Record flarum The process of building .
Because my personal blog site uses wordpress. So there are ready-made in the environment PHP Environmental Science , Follow the official documents to open directly , If your environment is clean , Then you need to install in advance PHP、php-fpm And other software environment , as well as composer Support for , Specific reference flarum Chinese community installation documentation [2]
flarum It's through composer install , So install it first composer
# wget -O composer-setup.php https://getcomposer.org/installer # php composer-setup.php --install-dir=/usr/local/bin --filename=composer # composer -v Composer version 2.2.4 2022-01-08 12:30:42
Next, create a flarum The installation directory of the file , Download the source code directly to this directory
mkdir /apps/flarum && cd $_ # download flarum Source code composer create-project flarum/flarum . --stability=beta --ignore-platform-req=ext-fileinfo
Finally, configuration nginx agent flarum Forum . Note some annotated parameters , Configuration or modification is required .
server {
listen 80;
listen 443 ssl http2;
ssl_certificate /www/server/panel/vhost/nginx/ssl/flarum.devopsman.cn_bundle.pem; # flarum Forum's https certificate
ssl_certificate_key /www/server/panel/vhost/nginx/ssl/flarum.devopsman.cn.key;
#include snippets/ssl-params.conf;
# should be changed
server_name flarum.devopsman.cn; # Change to your own domain name
client_max_body_size 20m; # modify
root /www/flarum/public/; # flarum Installation directory
index index.php index.html;
server_tokens off;
access_log /www/wwwlogs/flarum-access.logi main; # Define the log parsing format and storage location of the forum
error_log /www/wwwlogs/flarum-error.log;
# prevent webshell attack
location ~ ^/assets.*\.php {
deny all;
return 404;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000; # Here is the analysis php Of php-fpm Service address
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
# Pass requests that don't refer directly to files in the filesystem to index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /sitemap.xml {
try_files $uri $uri/ /index.php?$query_string;
}
# The following directives are based on best practices from H5BP Nginx Server Configs
# https://github.com/h5bp/server-configs-nginx
# Expire rules for static content
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
add_header Cache-Control "max-age=0";
}
location ~* \.(?:rss|atom)$ {
add_header Cache-Control "max-age=3600";
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
add_header Cache-Control "max-age=2592000";
access_log off;
}
location ~* \.(?:css|js)$ {
add_header Cache-Control "max-age=31536000";
access_log off;
}
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
add_header Cache-Control "max-age=2592000";
access_log off;
}
# Gzip compression
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/vnd.api+json
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
}
It's almost finished here . At initialization time , It needs to be initialized MySQL database , So you can prepare the remote connection account in advance . Access address :https://flarum.devopsman.cn
This is it. flarum Home page . There are also some problems during deployment , For example, an interface message is found when uploading pictures 500, These problems can be solved through flarum The cause of the problem is found in the running log under the installation directory :
flarum The label of classification is also very distinctive , You can quickly read the discussion of the specified tag :
Containerization
Because I already have... In my own running environment nginx、php、MySQL etc. , So for me, install directly flarum It is more convenient and efficient , If you start from scratch , You can use container deployment :
https://github.com/devsecops-ecosystem/flarum-docker-env.git
Here you can go directly through docker-compose One click deployment , Just modify it a little .
The last is , Welcome to build and maintain Cloud protobiosphere - Technology Forum Oh
Reference material
[1] Cloud protobiosphere : https://devopsman.cn
[2]flarum Chinese document : https://discuss.flarum.org.cn/d/1246
边栏推荐
- Why are you a test / development programmer? Can you recall
- How to merge upstream and downstream SQL data records
- Is the sink usually the JDBC insert update delete?
- 1016 部分A+B
- [fpga+sin] FPGA implementation of sinusoidal signal generator module based on DDS (direct digital synthesis)
- 直播预约|AWS Data Everywhere 系列活动
- IDEA修改jvm内存
- Nuxt - set SEO related tags, page titles, icons, etc. separately for each page (page configuration head)
- [new function] ambire wallet integrates Metis network
- How sqlserver queries and removes results with null fields in the whole column
猜你喜欢

科班出身,结果外包都不要

PostgreSQL 出现cross-database references are not implemented的bug

1018 hammer scissors cloth

If you choose the right school, you can enter Huawei as a junior college. I wish I had known

The five levels of making money, which level are you on?

yolox出现 RuntimeError: DataLoader worker (pid(s) 17724, 1364, 18928) exited unexpectedly

Blue Bridge Cup ruler method

直播预约|AWS Data Everywhere 系列活动

If I hadn't talked to Ali P7, I wouldn't know I was a mallet

moudo网络库剖析
随机推荐
webassembly学习-动态链接
1017 A除以B分
Is the increased life insurance off the shelf? What additional life insurance products are available now?
pytorch 读写文件
Developer scheme · environmental monitoring equipment (Xiaoxiong school IOT development board) connected to graffiti IOT development platform
I came from a major, so I didn't want to outsource
MySQL column to row conversion without Union
Implementation of b+ tree index based on xlsx
云主机mysql在本地电脑连接不上
1016 部分A+B
Ansible最佳实践之Playbook不同上下文提权Demo
Build a simple website by yourself
CDC2.2.1还不支持postgresql14.1么?基于pgbouncer连接方式下,以5433
Log in to the MySQL database and view the version number on the command line
大神们 在富函数的open中从mysql连接池里取连接 连接池初始化是20个 如果富函数的并行度是1
NotImplementedError: Could not run torchvision::nms
[C language] explain the thread recycling function pthread_ join
1019 digital black hole
Why are you a test / development programmer? Can you recall
1019 数字黑洞