##### /www/server/site_total/pid.txt exists=1 readable=1 size=7 1873940 ##### /www/server/site_total/scripts/install.sh exists=1 readable=1 size=2700 #!/bin/bash # 检查是否以root权限运行 if [ "$EUID" -ne 0 ]; then echo "请使用root权限运行此脚本" exit 1 fi # 设置变量 SERVICE_NAME="site_total" INSTALL_DIR="/www/server/site_total" SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" chown -R root:root $INSTALL_DIR # 检查安装目录是否存在 if [ ! -d "$INSTALL_DIR" ]; then echo "错误: 安装目录 $INSTALL_DIR 不存在" exit 1 fi # 检查可执行文件是否存在 if [ ! -f "${INSTALL_DIR}/${SERVICE_NAME}" ]; then echo "错误: 可执行文件 ${INSTALL_DIR}/${SERVICE_NAME} 不存在" exit 1 fi # 确保可执行文件有执行权限 chmod +x "${INSTALL_DIR}/${SERVICE_NAME}" # 复制nginx配置文件 NGINX_VHOST_PATH="/www/server/panel/vhost/nginx" cp -f "${INSTALL_DIR}/scripts/site_log_format.conf" "${NGINX_VHOST_PATH}/0.site_total_log_format.conf" if [ -f "${NGINX_VHOST_PATH}/0.site_total_map.conf" ];then rm -f "${NGINX_VHOST_PATH}/0.site_total_map.conf" fi # 复制apache配置文件 APACHE_CONF_DIR="/www/server/panel/vhost/apache" cp -f "${INSTALL_DIR}/scripts/apache_log_format.conf" "${APACHE_CONF_DIR}/0.site_total_log_format.conf" if [ -f "${APACHE_CONF_DIR}/0.site_total_cookie.conf" ];then rm -f "${APACHE_CONF_DIR}/0.site_total_cookie.conf" fi # 复制systemd服务文件 cp "${SCRIPT_DIR}/site_total.service" "$SERVICE_FILE" if [ $? -ne 0 ]; then # lsattr 检查 /etc/systemd是否有i属性 lsattr -d /etc/systemd|grep i >/dev/null 2>&1 if [ $? -eq 0 ]; then echo "检测到 /etc/systemd 目录被加锁,正在解锁..." chattr -R -i /etc/systemd cp "${SCRIPT_DIR}/site_total.service" "$SERVICE_FILE" if [ $? -ne 0 ]; then echo "错误: 无法复制服务文件到 $SERVICE_FILE,即使解锁后仍然失败" exit 1 fi chmod 644 "$SERVICE_FILE" systemctl daemon-reload systemctl enable "$SERVICE_NAME" # 再次加锁 /etc/systemd 目录 chattr -R +i /etc/systemd &> /dev/null else echo "错误: 无法复制服务文件到 $SERVICE_FILE" exit 1 fi fi # 设置正确的权限 chmod 644 "$SERVICE_FILE" # 重新加载systemd配置 systemctl daemon-reload # 启用并启动服务 systemctl enable "$SERVICE_NAME" systemctl stop "$SERVICE_NAME" systemctl start "$SERVICE_NAME" # 检查服务状态 echo "服务安装完成,当前状态:" sleep 2 systemctl status "$SERVICE_NAME" echo " 使用以下命令管理服务: 启动: systemctl start $SERVICE_NAME 停止: systemctl stop $SERVICE_NAME 重启: systemctl restart $SERVICE_NAME 查看状态: systemctl status $SERVICE_NAME 查看日志: journalctl -u $SERVICE_NAME " ##### /www/server/site_total/scripts/uninstall.sh exists=1 readable=1 size=913 #!/bin/bash # 检查是否以root权限运行 if [ "$EUID" -ne 0 ]; then echo "请使用root权限运行此脚本" exit 1 fi # 设置变量 SERVICE_NAME="site_total" SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service" # 检查服务是否存在 if [ ! -f "$SERVICE_FILE" ]; then echo "服务文件 $SERVICE_FILE 不存在,可能服务未安装" exit 1 fi # 停止并禁用服务 echo "停止 $SERVICE_NAME 服务..." systemctl stop "$SERVICE_NAME" echo "禁用 $SERVICE_NAME 服务..." systemctl disable "$SERVICE_NAME" # 删除服务文件 echo "删除服务文件..." rm -f "$SERVICE_FILE" # 重新加载systemd配置 systemctl daemon-reload # 删除nginx配置文件 echo "删除nginx配置文件..." rm -f /www/server/panel/vhost/nginx/extension/*/site_total.conf # 重载nginx echo "重载nginx..." /www/server/nginx/sbin/nginx -s reload echo "$SERVICE_NAME 服务已成功卸载" ##### /www/server/site_total/scripts/site_total.service exists=1 readable=1 size=285 [Unit] Description=Site Total Service After=network.target [Service] Type=simple User=root Group=root WorkingDirectory=/www/server/site_total ExecStart=/www/server/site_total/site_total Restart=always RestartSec=5 LimitNOFILE=65535 [Install] WantedBy=multi-user.target ##### /www/server/site_total/scripts/nginx_site.conf exists=1 readable=1 size=90 access_log syslog:server=unix:/tmp/site_total.sock,nohostname,tag=[ID]__access site_total; ##### /www/server/site_total/scripts/apache_site.conf exists=1 readable=1 size=93 CustomLog "| /usr/bin/logger -u /tmp/site_total.sock -d -S 8192 -t [ID]__access" site_total ##### /www/server/site_total/scripts/apache_log_format.conf exists=1 readable=1 size=1212 LoadModule logio_module modules/mod_logio.so LogFormat '{\ "server_addr": "%A",\ "server_port": %{local}p,\ "host": "%{Host}i",\ "x_forwarded_for": "%{X-Forwarded-For}i",\ "x_real_ip": "%{X-Real-IP}i",\ "x_forwarded": "%{X-Forwarded}i",\ "forwarded_for": "%{Forwarded-For}i",\ "forwarded": "%{Forwarded}i",\ "true_client_ip": "%{True-Client-IP}i",\ "client_ip": "%{Client-IP}i",\ "ali_cdn_real_ip": "%{Ali-CDN-Real-IP}i",\ "cdn_src_ip": "%{CDN-Src-Ip}i",\ "cdn_real_ip": "%{CDN-Real-Ip}i",\ "cf_connecting_ip": "%{CF-Connecting-IP}i",\ "x_cluster_client_ip": "%{X-Cluster-Client-IP}i",\ "wl_proxy_client_ip": "%{WL-Proxy-Client-IP}i",\ "proxy_client_ip": "%{Proxy-Client-IP}i",\ "remote_addr": "%a",\ "remote_port": %{remote}p,\ "remote_user": "%u",\ "https": "%{HTTPS}x",\ "req_length": %I,\ "method": "%m",\ "request": "%r",\ "request_filename": "%f",\ "status": %s,\ "sent_bytes": %O,\ "body_bytes_sent": %b,\ "user_agent": "%{User-Agent}i",\ "content_type": "%{Content-Type}o",\ "cookie": "%{Cookie}i",\ "accept": "%{Accept}i",\ "accept_language": "%{Accept-Language}i",\ "accept_encoding": "%{Accept-Encoding}i"\ }' site_total ##### /www/server/site_total/scripts/site_log_format.conf exists=1 readable=1 size=2051 log_format site_total escape=json '{' '"server_addr": "$server_addr",' '"server_port": $server_port,' '"host":"$http_host",' '"x_forwarded_for":"$http_x_forwarded_for",' '"x_real_ip":"$http_x_real_ip",' '"x_forwarded":"$http_x_forwarded",' '"forwarded_for":"$http_forwarded_for",' '"forwarded":"$http_forwarded",' '"true_client_ip":"$http_true_client_ip",' '"client_ip":"$http_client_ip",' '"ali_cdn_real_ip":"$http_ali_cdn_real_ip",' '"cdn_src_ip":"$http_cdn_src_ip",' '"cdn_real_ip":"$http_cdn_real_ip",' '"cf_connecting_ip":"$http_cf_connecting_ip",' '"x_cluster_client_ip":"$http_x_cluster_client_ip",' '"wl_proxy_client_ip":"$http_wl_proxy_client_ip",' '"proxy_client_ip":"$http_proxy_client_ip",' '"remote_addr":"$remote_addr",' '"remote_port":$remote_port,' '"remote_user":"$remote_user",' '"https":"$https",' '"req_length":$request_length,' '"method":"$request_method",' '"uri":"$request_uri",' '"request_filename":"$request_filename",' '"status":$status,' '"sent_bytes":$bytes_sent,' '"body_bytes_sent":$body_bytes_sent,' '"content_type":"$sent_http_content_type",' '"content_encoding":"$sent_http_content_encoding",' '"referer":"$http_referer",' '"user_agent":"$http_user_agent",' '"upstream_addr":"$upstream_addr",' '"upstream_status":$upstream_status,' '"upstream_response_time":$upstream_response_time,' '"take_time":$request_time,' '"msec":$msec,' '"cookie":"$http_cookie",' '"accept":"$http_accept",' '"accept_language":"$http_accept_language",' '"accept_encoding":"$http_accept_encoding"' '}'; ##### /etc/systemd/system/site_total.service exists=1 readable=1 size=285 [Unit] Description=Site Total Service After=network.target [Service] Type=simple User=root Group=root WorkingDirectory=/www/server/site_total ExecStart=/www/server/site_total/site_total Restart=always RestartSec=5 LimitNOFILE=65535 [Install] WantedBy=multi-user.target System Error
##### /lib/systemd/system/site_total.service exists=0 readable=0 size=0 READFAIL ##### /usr/lib/systemd/system/site_total.service exists=0 readable=0 size=0 READFAIL

[0] HttpException in App.php line 390

控制器不存在:app\index\controller\sitemap\Xml

  1. // 设置当前请求的控制器、操作
  2. $request->controller(Loader::parseName($controller, 1))->action($actionName);
  3. // 监听module_init
  4. Hook::listen('module_init', $request);
  5. try {
  6. $instance = Loader::controller($controller, $config['url_controller_layer'], $config['controller_suffix'], $config['empty_controller']);
  7. } catch (ClassNotFoundException $e) {
  8. throw new HttpException(404, 'controller not exists:' . $e->getClass());
  9. }
  10. // 获取当前操作名
  11. $action = $actionName . $config['action_suffix'];
  12. $vars = [];
  13. if (is_callable([$instance, $action])) {
  14. // 执行操作方法
  15. $call = [$instance, $action];

Call Stack

  1. in App.php line 390
  2. at App::module(['index', 'sitemap.xml', null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 296
  3. at App::exec(['type' => 'module', 'module' => ['index', 'sitemap.xml', null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  4. at App::run() in start.php line 18
  5. at require('/www/wwwroot/zfwxhao...') in index.php line 17

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

server_name_session
f0d98668e71225c1cde7804b37c7e31a
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/zfwxhaou.com/index.php
QUERY_STRING
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/sitemap.xml
DOCUMENT_URI
/index.php//sitemap.xml
DOCUMENT_ROOT
/www/wwwroot/zfwxhaou.com
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.28.1
REMOTE_ADDR
104.23.243.206
REMOTE_PORT
13439
SERVER_ADDR
212.86.127.68
SERVER_PORT
80
SERVER_NAME
zfwxhaou.com
REDIRECT_STATUS
200
PATH_INFO
//sitemap.xml
HTTP_X_FORWARDED_FOR
216.73.216.101
HTTP_COOKIE
server_name_session=f0d98668e71225c1cde7804b37c7e31a
HTTP_ACCEPT_ENCODING
gzip, br
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT
*/*
HTTP_CF_RAY
a52ffb4facfdb1bb-CMH
HTTP_CDN_LOOP
cloudflare; loops=1
HTTP_CF_CONNECTING_IP
216.73.216.101
HTTP_CF_IPCOUNTRY
US
HTTP_CF_VISITOR
{"scheme":"https"}
HTTP_X_FORWARDED_PROTO
https
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
zfwxhaou.com
PHP_SELF
/index.php//sitemap.xml
REQUEST_TIME_FLOAT
1793421626.9781
REQUEST_TIME
1793421626
Environment Variables
empty

ThinkPHP Constants

BIND_MODULE
index
APP_PATH
/www/wwwroot/zfwxhaou.com/application/
THINK_VERSION
5.0.11
THINK_START_TIME
1793421626.9836
THINK_START_MEM
270816
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/zfwxhaou.com/thinkphp/
LIB_PATH
/www/wwwroot/zfwxhaou.com/thinkphp/library/
CORE_PATH
/www/wwwroot/zfwxhaou.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/zfwxhaou.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/zfwxhaou.com/
EXTEND_PATH
/www/wwwroot/zfwxhaou.com/extend/
VENDOR_PATH
/www/wwwroot/zfwxhaou.com/vendor/
RUNTIME_PATH
/www/wwwroot/zfwxhaou.com/runtime/
LOG_PATH
/www/wwwroot/zfwxhaou.com/runtime/log/
CACHE_PATH
/www/wwwroot/zfwxhaou.com/runtime/cache/
TEMP_PATH
/www/wwwroot/zfwxhaou.com/runtime/temp/
CONF_PATH
/www/wwwroot/zfwxhaou.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false