首页
留言板
友链
关于
推荐
wszx博客
Search
1
部署MJJ自己的信息聚合站 —— rss-reader改版搭建~(内含详细步骤)
1 阅读
2
Caddy2的安装与使用,轻松实现反向代理和重定向
1 阅读
3
用docker-compose 搭建 兰空图床
1 阅读
4
用Cloudflare轻松搭建Uptime-Flare监控服务!实时掌握网站状况!
1 阅读
5
欢迎使用 Typecho
0 阅读
默认
日常
学习
技术
登录
Search
标签搜索
安装
cloudflare
CF
壁纸
图片
白嫖
docker
脚本
Linux
Caddy
代码
域名
桌面壁纸
手机壁纸
NAT
LXC
HTML
网页
vps
哪吒
ws01
累计撰写
73
篇文章
累计收到
5
条评论
首页
栏目
默认
日常
学习
技术
页面
留言板
友链
关于
推荐
wszx博客
搜索到
4
篇与
的结果
2024-12-13
用 frankenphp+mysql 快速搭建一个高性能的网站-2!
用 frankenphp+mysql 快速搭建一个高性能的网站-2! FrankenPHP 是构建在Caddy Web 服务器之上的现代 PHP 应用程序服务器。一、docker安装curl -fsSL https://get.docker.com | sh && ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin二、创建目录结构mkdir -p /home/web/{caddy,html,,mysql} touch /home/web/caddy/Caddyfile三、下载源码1、web1网站cd /home/web/html/ && mkdir web1 && cd web1 上传php文件【下面的 WSZXIMG 修改用大写,另一个网站从上一步增加web2并进入,下一步也要修改,6379不修改】echo "define('FS_METHOD', 'direct'); define('WSZXWEB_REDIS_HOST', 'redis'); define('WSZXWEB_REDIS_PORT', '6379');" >> /home/web/html/web1/web1-config-sample.php2、web2网站cd /home/web/html/ && mkdir web2 && cd web2 echo "define('FS_METHOD', 'direct'); define('WSZXWEBB_REDIS_HOST', 'redis'); define('WSZXWEBB_REDIS_PORT', '6379');" >> /home/web/html/web2/web2-config-sample.php四、配置Caddyfile,以kjlion.com为例,cf上小云朵随便。nano /home/web/caddy/Caddyfile{ frankenphp order mercure after encode order vulcain after reverse_proxy order php_server before file_server order php before file_server } 1.kjlion.com { root * public/web1 encode zstd gzip php_server } 2.kjlion.com { root * public/web2 encode zstd gzip php_server } 五、启动环境wget -O /home/web/docker-compose.yml https://raw.githubusercontent.com/wszx123/gongjuxiang/refs/heads/main/.github/workflows/docker-compose-frankenphp.yml nano /home/web/docker-compose.yml cd /home/web && docker-compose up -d六、安装PHP扩展,最好分两次1、docker exec -it web install-php-extensions mysqli gd intl zip opcache docker exec -it web install-php-extensions exif imagick redis2、下面的最大上传50M可修改为100M,内存256M也可修改为128Mdocker exec web sh -c 'echo "upload_max_filesize=50M \n post_max_size=50M" > /usr/local/etc/php/conf.d/uploads.ini' docker exec web sh -c 'echo "memory_limit=256M" > /usr/local/etc/php/conf.d/memory.ini' docker exec web sh -c 'echo "max_execution_time=1200" > /usr/local/etc/php/conf.d/max_execution_time.ini' docker exec web sh -c 'echo "max_input_time=600" > /usr/local/etc/php/conf.d/max_input_time.ini'七、创建数据库, 不用数据库的可不安装 【备注1:enter password:是上一步启动环境中设置的MYSQL_ROOT_PASSWORD: webroot,备注2:上一步的 MYSQL_USER: kejilion 名称与这一步中的TO 'kejilion'@'%'; 的名称要一致】docker exec -it mysql mysql -u root -p CREATE DATABASE web1; GRANT ALL PRIVILEGES ON web1.* TO 'kejilion'@'%';八、重启环境,重新安装另一网站要重启cd /home/web && docker-compose restart
2024年12月13日
0 阅读
0 评论
0 点赞
2024-04-30
RN服务器添加 IPV6 地址
RN服务器添加 IPV6 地址 请注意,对于 Ubuntu 和 Debian 实例,需要在配置后手动启用 IPV6。请按照以下步骤为您的服务器启用 IPv6 地址。通过 ssh 连接登录到您的服务器并在 sysctl.conf 文件中添加以下条目:nano /etc/sysctl.conf一直向下滚动,并在末尾添加以下行:net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.eth0.accept_ra = 0替换前备份net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 要检查运行:sysctl -p然后尝试重启网络systemctl restart networking然后检查ping6 google.com如果仍然无法正常工作,请尝试重新启动您的 VPS。注意:最后,还要确保 /etc/sysctl.conf 文件中没有任何可能禁用 IPv6 连接的值。如果是这样,请务必将其注释掉,然后使用“sysctl -p”或重新启动 VPS 来刷新您的设置。
2024年04月30日
0 阅读
0 评论
0 点赞
2024-04-07
高性价比vps小鸡ccs
高性价比vps小鸡ccs ,主打性价比高,流量充足,可windows系统,大厂稳定等,现都可特价购买,放开了。--------------------------------colocrossing--------------------------------下面这四款vps,购买时都可以选择 win系统 1、1核,1G,20G,1Gbps/不限流量 $10/年2、1核,2G,40G,1Gbps/不限流量 $15/年【实际开出:2核,2G,40G。】3、2核,3G,50G,1Gbps/不限流量 $20/年4、3核,4G,60G,1Gbps/不限流量 $24/年10刀 , 15刀 , 20刀 , 24刀 --------------------------------colocrossing--------------------------------常规购买: 特价购买:
2024年04月07日
0 阅读
0 评论
0 点赞
2024-03-11
VPS剩余价值计算器 V5.0
VPS剩余价值计算器 V5.0 本内容转载自: https://www.nodeseek.com/post-29398-1感谢 juhua大佬 修正了部分CSS错误改用js重写计算部分输出计算结果后原来输入的部分内容不会自动清除也就是说,现在可以脱离php环境运行了,直接另存为 shengyu.html后缀即可,甚至可以在本地用chrome直接打开该html文件即可运行 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>VPS交易计算器 V5.0</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> </head> <body> <div class="container mt-5"> <h1 class="mb-4">VPS交易计算器</h1> <form id="calculatorForm"> <div class="form-group"> <label for="purchasePrice">续费价格:</label> <input type="number" class="form-control" id="purchasePrice" name="purchasePrice" step="0.01" required> </div> <div class="form-group"> <label for="tradePrice">交易价格:</label> <input type="number" class="form-control" id="tradePrice" name="tradePrice" step="0.01" required> </div> <div class="form-group"> <label for="currentDate">当前日期:</label> <input type="date" class="form-control" id="currentDate" name="currentDate" required> </div> <div class="form-group"> <label for="expiryDate">到期日期:</label> <input type="date" class="form-control" id="expiryDate" name="expiryDate" required> </div> <div class="form-group"> <label for="paymentFrequency">付款周期:</label> <select class="form-control" id="paymentFrequency" name="paymentFrequency" required> <option value="yearly">年付</option> <option value="halfyearly">半年付</option> <option value="quarterly">季付</option> <option value="monthly">月付</option> <option value="two-yearly">二两付</option> <option value="three-yearly">三年付</option> <option value="five-yearly">五年付</option> </select> </div> <button type="button" class="btn btn-primary" onclick="calculateRemainingValue()">计算剩余价值</button> </form> <div class="result mt-4" style="display: none;"> <h3>计算结果:</h3> <p>续费价格: <span id="resultPurchasePrice"></span></p> <p>剩余价值计算周期: <span id="resultPaymentFrequency"></span></p> <p>剩余价值: <span id="resultRemainingValue"></span></p> <p>交易价格: <span id="resultTradePrice"></span></p> <p>溢价金额: <span id="resultPremium"></span></p> <p>购买建议: <span id="resultAdvice"></span></p> </div> <div class="mt-4"> <h3>计算过程:</h3> <div class="accordion" id="calculationProcess"> <div class="card"> <div class="card-header" id="headingOne"> <h2 class="mb-0"> <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> 展开计算过程 </button> </h2> </div> <div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#calculationProcess"> <div class="card-body" id="calculationDetails"> <!-- Calculation details will be displayed here --> </div> </div> </div> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@popperjs/
[email protected]
/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <script> function calculateRemainingValue() { // Retrieve input values const purchasePrice = parseFloat(document.getElementById("purchasePrice").value); const tradePrice = parseFloat(document.getElementById("tradePrice").value); const currentDate = new Date(document.getElementById("currentDate").value); const expiryDate = new Date(document.getElementById("expiryDate").value); const paymentFrequency = document.getElementById("paymentFrequency").value; // Calculate remaining days const remainingDays = Math.floor((expiryDate - currentDate) / (24 * 60 * 60 * 1000)); const remainingMonths = Math.floor(remainingDays / 30); // Calculate remaining value let paymentFrequency_ = ""; let remainingValue = 0; switch (paymentFrequency) { case "quarterly": paymentFrequency_ = "季付"; remainingValue = purchasePrice / 90 * remainingDays; break; case "yearly": paymentFrequency_ = "年付"; remainingValue = purchasePrice / 365 * remainingDays; break; case "halfyearly": paymentFrequency_ = "半年付"; remainingValue = purchasePrice / 180 * remainingDays; break; case "monthly": paymentFrequency_ = "月付"; remainingValue = purchasePrice / 30 * remainingDays; break; case "two-yearly": paymentFrequency_ = "二两付"; remainingValue = purchasePrice / (365 * 2) * remainingDays; break; case "three-yearly": paymentFrequency_ = "三年付"; remainingValue = purchasePrice / (365 * 3) * remainingDays; break; case "five-yearly": paymentFrequency_ = "五年付"; remainingValue = purchasePrice / (365 * 5) * remainingDays; break; } const premium = tradePrice - remainingValue; // Display results document.getElementById("resultPurchasePrice").textContent = purchasePrice; document.getElementById("resultPaymentFrequency").textContent = paymentFrequency_; document.getElementById("resultRemainingValue").textContent = remainingValue; document.getElementById("resultTradePrice").textContent = tradePrice; document.getElementById("resultPremium").textContent = premium; // Determine advice let advice = ""; if (premium > 0) { advice = "存在溢价,请君三思而后行"; } else if (premium < 0) { advice = "卖家血亏,快买,错过拍断大腿!"; } else { advice = "不议价,良心卖家!"; } document.getElementById("resultAdvice").textContent = advice; // Display calculation details const calculationDetails = ` <p>剩余月份:${remainingMonths} 个月(剩余天数:${remainingDays} 天)</p> <p>剩余价值 = 历史购买价格 / ${paymentFrequency === 'yearly' ? 365 : (paymentFrequency === 'halfyearly' ? 180 : (paymentFrequency === 'quarterly' ? 90 : (paymentFrequency === 'monthly' ? 30 : (paymentFrequency === 'two-yearly' ? 730 : (paymentFrequency === 'three-yearly' ? 1095 : 1825)))))} * 剩余天数</p> <p>剩余价值 = ${purchasePrice} / ${paymentFrequency === 'yearly' ? 365 : (paymentFrequency === 'halfyearly' ? 180 : (paymentFrequency === 'quarterly' ? 90 : (paymentFrequency === 'monthly' ? 30 : (paymentFrequency === 'two-yearly' ? 730 : (paymentFrequency === 'three-yearly' ? 1095 : 1825)))))} * ${remainingDays} = ${remainingValue}</p> `; document.getElementById("calculationDetails").innerHTML = calculationDetails; // Show the result section document.querySelector(".result").style.display = "block"; } </script> </body> </html>
2024年03月11日
0 阅读
0 评论
0 点赞
您是第
133452
位访客