flarum使用
270 字
1 分钟
flarum使用
# 安装fileinfo扩展 假设为php8.0cd /root/lnmp1.9/src & tar -xvf php-8.0.20.tar.bz2cd /root/lnmp1.9/src/php-8.0.20/ext/fileinfo
/usr/local/php/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-configmake && make install
\usr\local\php\etc\php.inidisable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server
#末尾添加extension=fileinfo.soextension=exif.sophp -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"php composer-setup.phpphp -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
cd /home/wwwroot/flarum & composer update# 添加重写/usr/local/nginx/conf/rewrite/other.conf
/home/wwwroot/flarum/.nginx.conf# Pass requests that don't refer directly to files in the filesystem to index.phplocation / {try_files $uri $uri/ /index.php?$query_string;}
# Uncomment the following lines if you are not using a `public` directory# to prevent sensitive resources from being exposed.# location ~* ^/(\.git|composer\.(json|lock)|auth\.json|config\.php|flarum|storage|vendor) {# deny all;# return 404;# }
# The following directives are based on best practices from H5BP Nginx Server Configs# https://github.com/h5bp/server-configs-nginx
# Expire rules for static contentlocation ~* \.(?: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 compressiongzip on;gzip_comp_level 5;gzip_min_length 256;gzip_proxied any;gzip_vary on;gzip_typesapplication/atom+xmlapplication/javascriptapplication/jsonapplication/ld+jsonapplication/manifest+jsonapplication/rss+xmlapplication/vnd.geo+jsonapplication/vnd.ms-fontobjectapplication/x-font-ttfapplication/x-web-app-manifest+jsonapplication/xhtml+xmlapplication/xmlfont/opentypeimage/bmpimage/svg+xmlimage/x-icontext/cache-manifesttext/csstext/javascripttext/plaintext/vcardtext/vnd.rim.location.xloctext/vtttext/x-componenttext/x-cross-domain-policy;#如果数据库连不上 先导入创建Allen这个用户mysql -u root -p Allen < /Allen.sql 相关文章 智能推荐
1
pve-vgpu使用篇
服务器 前言: 使用优化版fastapi-dls镜像 https://registry.hub.docker.com/r/makedie/fastapi-dls 方便配置 目前这个镜像更新到1.3.8版本 本文亦以此为例 (仅以pve为例,其他环境...
2
其实算是第一次的netcup注册使用
服务器 netcup注册使用总结 nodeseek上看的热门的性价比机器 hostloc和ns上看了帖子说ns注册和下单规则,也去下一个吧,下单注册地区China,可以的话直接使用上面的小鸡链接下单,会直接显示免税价格,信息填写准确 最好是用真实信...
3
Onlyservers R640 8-Bay/10-Bay 2.5" - No NVME | €322,35 per month
服务器 yabs 官方描述配置 | | | |-------------------|---------------------------------------------------------------------| | **System...
4
出机模板
服务器 |机器|配置|到期日|售价| |---|---|---|---| |Hostzdire旧金山28刀| 4C6G100G 25T出口流量|2026年7月22日|折价出 130元开二验| |Hostzdire旧金山20刀| 4C6G100G 2...
5
Onlyservers 9.9欧超级大杜甫
服务器 onlyservers .dan_onlyservers于2025年9月2日在Lowendtalk 发布了 ** FLASH SALE ** - 100 Dedicated Servers - first month $9.99/each...
随机文章 随机推荐