1.安装教程: https://www.photo.gallery/docs/setup/
下载程序上传到网站根目录
https://www.photo.gallery/downloads/
nginx需要设置伪静态

  location / {
    if (!-e $request_filename){

      # Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists
      rewrite (.+)\.(html|json|xml|atom|rss)$ $1/ last;

      # Rewrite any calls to /render to the X3 image resizer
      rewrite ^/render/. /app/parsers/slir/ last;

      # Rewrite routes to X3 application index.php if they are non-existent files/dirs
      rewrite ^(.*)$ /index.php?$1 last;
    }
  }

  # Prevent web access to X3 /config and /_cache directories
  location ~ /(config|_cache) {
    deny all;
  }

登录后台:http://localhost/panel/
账号密码 admin/admin
按要求去Settings › Advanced 关了Disable diagnostics就能访问首页了。
需要显示的文件夹放到/content 目录下

破解方法:验证网址https://auth.photo.gallery/改成 /auth

1)前台 修改 /app/public/js/3.30.1/x3.min.js
搜索 aHR0cHM6Ly9hdXRoLg 替换为 Lw

 https://auth        /

搜索 cGhvdG8uZ2FsbGVyeQ 替换为 YXV0aA

  photo.gallery           auth

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.30.1/x3.min.js");

4)新建 验证文件/auth/index.php

<?php 
header('Access-Control-Allow-Origin:*');   
header('content-type:application/json');
$allowed_hosts = array('536000.xyz', 'www.536000.xyz','wwwww.eu.org'); 
if (in_array($_SERVER['SERVER_NAME'], $allowed_hosts)) {
    echo '{"status":200,"message":"License is valid","parameters":{"type":"1"}}';
}else{
    echo '{"status":301,"message":"License not Found"}';
}
 
?>

后台设置--Advanced--关闭 Use CDN [Content Delivery Network]
这样应该可以了

好像status不是301它就不跳转了,随便写

目前个人使用遇到最大问题
文件夹不支持 #$%^&*()+=[]'"/|{}`~!@.


后续:
如果首页缩略图无法加载,一直转圈圈
删除宝塔配置文件里面的这一段再重启一下PHP即可。

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
        error_log /dev/null;
        access_log off;
    }
最后修改:2021 年 05 月 16 日
如果觉得我的文章对你有用,请随意赞赏