宝塔面板站点配置 需要删除以下代码否则将会引起冲突,无法展示缩放图
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires 30d;error_log /dev/null;access_log /dev/null;}
前面最新版是X3.32.0,以这个版本为例,
免费版也可用,差别是免费版不能修改前台页脚版权,另外有的功能不能使用,好像全景图、3d
破解方法:验证网址https://auth.photo.gallery/改成 /auth
1)前台 修改 /app/public/js/3.32.0/x3.min.js
搜索 aHR0cHM6Ly9hdXRoLg 替换为 Lw
搜索 cGhvdG8uZ2FsbGVyeQ 替换为 YXV0aA
2)后台 修改 /panel/filemanager_js/x3_panel.js
搜索 aHR0cHM6Ly9hdXRoLnBob3RvLmdhbGxlcnkv 替换为 L2F1dGgv
3)修改使用本地x3.min.js(默认是使用jsdelivr,无法加载再请求本地js)
修改/app/templates/cc/29/202264ab201d0d43a63882c31b1c06ae7e7992a5c371c52f885633d0acfa.php
大概第71行
$context[“core_js”] = ((“https://cdn.jsdelivr.net/npm/x3.photo.gallery@” . $this->getAttribute((isset($context[“page”]) ? $context[“page”] : null), “x3_version”)) . “/js/x3.min.js”);
修改为:
$context[“core_js”] = (“/app/public/js/3.32.0/x3.min.js”);
4)新建 验证文件/auth/index.php 这样,可以自定义域名验证
<?php header('Access-Control-Allow-Origin: *');header('content-type:application/json');$allowed_hosts = array('填你的域名', '填你的主域名');if (in_array($_SERVER['SERVER_NAME'], $allowed_hosts)) {echo '{"status":200,"message":"License is valid [btu.pp.ua]","parameters":{"type":"1"}}';}else{echo '{"status":301,"message":"License not Found"}';}?>
目前个人使用遇到最大问题
文件夹不支持 #$%^&*()+=[]'”/\|{}`~!@.
伪静态规则
# X3 rewrite ruleslocation / {if (!-e $request_filename){# Rewrite any calls to html|json|xml|atom|rss if a folder matching * existsrewrite (.+)\.(html|json|xml|atom|rss)$ $1/ last;# Rewrite any calls to /render to the X3 image resizerrewrite ^/render/. /app/parsers/slir/ last;# Rewrite routes to X3 application index.php if they are non-existent files/dirsrewrite ^(.*)$ /index.php?$1 last;}}# Prevent web access to X3 /config and /_cache directorieslocation ~ /(config|_cache) {deny all;}
评论
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。