使用1panel面板openresty的typecho伪静态规则
原本的NGINX会出现404错误if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; }
该分类下共有 95 篇文章
原本的NGINX会出现404错误if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; }
美化代码 来自于@木木老师自定义样式美化标签.status-text{font-size:10px !important;border:none;color:rgb(156,163,175) !important;} .tag-span,.dark .tag-span{border: 1px solid;border-radius:6px;padding:0px 6px;color:rgb(22,163,74) !important;font-size:12px !important;-webkit-transform: scale(calc(10 / 12));transform-origin: left center;} .memo-content-text .link{color:rgb(22,163,74) !important;margin-right:-6px;} header .bg-blue-600{display:none !important;} .text-lg {font-size: 1rem !important;} .header-wrapper,.sidebar-wrapper{width: 11rem !important;} .filter-query-container{padding-bottom:0.5rem;}自定义代码调用背景html{background-image:url('https://bing.immmmm.com/img/bing?region=zh-CN&type=image');width:100%;height:100vh;background-position:center;background-size:cover;background-attachment:fixed;} .w-full.bg-zinc-100,.bg-white,.hover:bg-white:hover,.dark .dark:bg-zinc-700,.dark .dark:hover:bg-zinc-700:hover,.memo-wrapper,.bg-gray-200,.dark .memo-wrapper,.memo-editor-container{--tw-bg-opacity:0.66 !important;} .dark header.dark:bg-zinc-800,aside.dark:bg-zinc-800,.bg-gray-100,.dark html,.dark body{--tw-bg-opacity:0 !important;} .memo-editor-container>.memo-editor{background-color: transparent !important;}
套餐$16.50/Year2 vCPU Cores1 GB Dedicated RAM50 GB RAID10 SSD Cached Disk3 TB/Mo Bandwidth at 1 Gb/s1x IPv4 and 3x IPv6Los Angeles, USDC2 电信联通直连移动绕道日本香港
在根目录下创建swap文件夹sudo mkdir /swap cd /swap创建SWAPFILEsudo fallocate -l 16G swapfile查看刚才创建的ls -lh /swapfile 修改权限sudo chmod 600 /swap/swapfile将这个目录设置为交换分区sudo mkswap /swap/swapfile启用交换分区sudo swapon /swap/swapfile查看是否启用sudo swapon --show备份sudo cp /etc/fstab /etc/fstab.bak修改配置文件echo '/swap/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
如何使用Docker快速部署mastodon实例直接使用docker compose部署是不可行的,需要按照步骤进行创建目录mkdir -p /home/mastodon/mastodon进入目录cd /home/mastodon/mastodon拉取镜像docker pull ghcr.io/mastodon/mastodon修改docker compose配置文件wget https://raw.githubusercontent.com/mastodon/mastodon/main/docker-compose.yml修改docker compose文件中的版本号初始化PostgreSQL重要!!!!!docker run --name postgres14 -v /home/mastodon/mastodon/postgres14:/var/lib/postgresql/data -e POSTGRES_PASSWORD=设置数据库管理员密码 --rm -d postgres:14-alpine进入数据库docker exec -it postgres14 psql -U postgres创建用户名mastodon的密码CREATE USER mastodon WITH PASSWORD '数据库密码(最好和数据库管理员密码不一样)' CREATEDB;停止dockerdocker stop postgres14配置Mastodon在/home/mastodon/mastodon根文件夹中创建空白.env.production文件cd /home/mastodon/mastodon touch .env.production运行引导docker-compose run --rm web bundle exec rake mastodon:setup按照提示进行操作Below is your configuration, save it to an .env.production file outside Docker:之后会出现配置文件的数据,复制下来写入.env.production中启动Mastodondocker-compose down docker-compose up -d文件夹赋权chown 991:991 -R ./public chown -R 70:70 ./postgres14 docker-compose down docker-compose up -d创建管理员docker exec mastodon-web-1 tootctl accounts create USERNAME --email EMAIL --confirmed --role Owner至此完成
配置主板 精粤h97i gamingcpu e3 1231 v3内存16g ddr3显卡 rx560硬盘 480ssd网卡bcm943224截图bios设置禁止csm禁止cfg lock打开 above 4g引导下载点此下载
关于GotosocialGoToSocial 是一个十分轻量(轻量到甚至没有用户界面,需要使用第三方程序登录、兼容 Mastodon 应用进行使用)的 ActivityPub 联邦社交网络程序,自建 GoToSocial 可以避免您的信息因为所在实例倒闭、不可抗力等原因化为乌有。准备注册 Fly.io 账号,并绑卡(避免滥用);注册 Cloudflare 并启用 R2,启用 R2 需要绑卡。新建一个储存桶并创建一个 API 令牌。安装 flyctlLinuxcurl -L https://fly.io/install.sh | shmacOScurl -L https://fly.io/install.sh | shWindows,需要开启 RemoteSigned: 管理员运行 Set-ExecutionPolicy -ExecutionPolicy RemoteSignedpowershell -Command "iwr https://fly.io/install.ps1 -useb | iex"登录flyctl auth login # 若登录失败使用 # flyctl auth login -i # 输入账号密码进行登录创建APPYOURAPPNAME更改为自己希望设置的名称flyctl launch --name YOURAPPNAME --image=superseriousbusiness/gotosocial:latest --region hkg --no-deploy创建储存卷flyctl volumes create social_data --region hkg --size 1编辑配置编辑根目录下的 fly.toml 配置文件,参考下方app = "gotos" ## 自定义名称 primary_region = "hkg" ##服务器节点,当前为香港 [experimental] vm = true [build] image = "superseriousbusiness/gotosocial:latest" [env] GTS_HOST = "GTS的域名" TZ = "Asia/Chongqing" GTS_DB_ADDRESS = "/gotosocial/storage/sqlite.db" GTS_DB_TLS_MODE = "enable" GTS_DB_TYPE = "sqlite" GTS_LETSENCRYPT_ENABLED = "false" GTS_STORAGE_BACKEND = "s3" GTS_STORAGE_S3_BUCKET = "BUCKET名称" GTS_STORAGE_S3_ENDPOINT = "#S3 API" GTS_STORAGE_S3_ACCESS_KEY = "#api-tokens" GTS_STORAGE_S3_SECRET_KEY = "#api-tokens" GTS_STORAGE_S3_PROXY = "true" [[mounts]] source = "social_data" destination = "/gotosocial/storage" [http_service] internal_port = 8080 force_https = true auto_stop_machines = false auto_start_machines = true min_machines_running = 1 processes = ["app"]以上配置中GTS_STORAGE_S3_ENDPOINT不需要带https:和最后的/BUCKET名称部署flyctl deploy启动成功后会显示一个URL,能成功访问则代表部署成功。创建用户和管理员在 fly.toml 文件目录执行flyctl ssh console创建用户/gotosocial/gotosocial admin account create --username YOUR_USERNAME --email YOUR@EMAIL.COM --password 'SOME_VERY_GOOD_PASSWD'YOUR_USERNAME为用户名YOUR@EMAIL.COM为邮箱SOME_VERY_GOOD_PASSWD为密码,需设置足够复杂,太简单会提示密码不够安全,需重新设置设置管理员/gotosocial/gotosocial admin account promote --username YOUR_USERNAME演示https://ima.cmhttps://ima.cm/@jkjoy
参考项目https://github.com/hu3rror/memos-on-fly准备工作1.注册FLY.IO 用以部署memos2.注册B2C https://www.backblaze.com/cloud-storage 用以同步备份memos数据库 新建BUCKET,并获取<keyId>和<applicationKey>安装flyctlInstall flyctl 以WINDOWS为例pwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"其他系统请参照官方新建APP初始化flyctl launch按照提示选择会生成一个FLY.TOML文件编辑FLY.TOML添加以下内容[build] image = "ghcr.io/hu3rror/memos-litestream:latest" #如果不需要备份数据库则可以选择官方的docker镜像ghcr.io/usememos/memos:latest #使用官方镜像可以删掉env的部分 [env] # Details see: https://litestream.io/guides/backblaze/ LITESTREAM_REPLICA_BUCKET = "B2C桶名称" # change to your litestream bucket name LITESTREAM_REPLICA_ENDPOINT = "s3.us-east-005.backblazeb2.com" # change to your litestream endpoint url LITESTREAM_REPLICA_PATH = "memos_prod.db" # keep the default or change to whatever path you want [[mounts]] source = "memos_data" destination = "/var/opt/memos" [http_service] internal_port = 5230 force_https = true auto_stop_machines = false auto_start_machines = true min_machines_running = 0添加1g存储空间flyctl volumes create memos_data --region hkg --size 1添加密钥将B2存储的密钥添加到fly的密钥存储中,使用官方镜像可以忽略此步骤flyctl secrets set LITESTREAM_ACCESS_KEY_ID="<keyId>" LITESTREAM_SECRET_ACCESS_KEY="<applicationKey>"部署执行flyctl deploy看到成功的提示可打开域名查看演示地址https://memosim.fly.dev/绑定域名演示https://imad.top下载数据库fly.io部署artalk或者memos后,使用SFTP下载SQLite 数据库flyctl sftp get ./data/artalk.db #数据库路径
众所周知Fly.io是一个免费的SAAS平台提供三个内存为256MB,总3G硬盘空间.为防止滥用,需要绑定信用卡.Free allowances Resources included for free on all plans: Up to 3 shared-cpu-1x 256mb VMs† 3GB persistent volume storage (total) 160GB outbound data transfer准备安装官方的命令行工具flyctl初始化flyctl launch根据提示创建一个app创建一个1G的硬盘1G的硬盘用来储存评论数据绰绰有余了flyctl volumes create artalk_data --region hkg --size 1编辑FLY.TOML#根据自动生成的FLY.TOML文件修改 app = "atim" primary_region = "hkg" [build] image = "artalk/artalk-go" [http_service] internal_port = 23366 force_https = true auto_stop_machines = true auto_start_machines = true min_machines_running = 0 processes = ["app"] [[mounts]] source = "artalk_data" destination = "/data" [experimental] vm = true在 fly.toml 文件目录执行flyctl ssh console创建一个管理员账号./artalk admin如需重启则执行flyctl apps restart上传IP数据库ip2region.xdbfly.io部署artalk后,连接SFTP上传ip2region.xdb到data目录中以下在FLY.TOML根目录下执行flyctl sftp shell cd data put ip2region.xdb等待上传在artalk后台中设置路径./data/ip2region.xdb即可.使用SFTP下载SQLite 数据库flyctl sftp get ./data/artalk.db #数据库路径
功能介绍系统状态监控支持多用户多协议,网页可视化操作支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-door、socks、http支持配置更多传输配置流量统计,限制流量,限制到期时间可自定义 xray 配置模板支持 https 访问面板(自备域名 + ssl 证书)支持一键SSL证书申请且自动续签更多高级配置项,详见面板安装&升级bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)### 项目地址https://github.com/vaxilu/x-ui由于该项目已经不再维护可以使用后续魔改版本bash <(curl -Ls https://raw.githubusercontent.com/xeefei/3x-ui/master/install.sh)
阅读3服务器版,桌面端,iOS可用开源地址https://github.com/hectorqin/reader默认安装了docker下载项目里的 docker-compose.yamlwget https://ghproxy.com/https://raw.githubusercontent.com/hectorqin/reader/master/docker-compose.yaml根据 docker-compose.yaml 里面的注释编辑所需配置vim docker-compose.yaml启动 docker-composedocker-compose up -d停止 docker-composedocker-compose stop查看实时日志docker logs -f reader自行导入远程书源(打开链接后复制网址导入即可)https://legado.aoaostar.com/手动更新docker-compose pull && docker-compose up -d