现场核验:服务器与运行环境

陕西体育局 · 壹体服务器 · 只读核验 · 2026-07-23 10:44 CST

root@test-70-36 — sensitive values omitted
$ hostnamectl
Static hostname: test-70-36
Operating System: CentOS Linux 7 (Core)
Kernel: Linux 5.4.278-1.el7.elrepo.x86_64
Architecture: x86-64

$ free -h
Mem: 31G total / 26G available    Swap: 8.0G

$ df -hT / /data
/      ext4   90G total / 81G available / 7% used
/data  ext4  296G total / 269G available / 5% used

$ nginx -v ; php -v ; mysql --version
nginx/1.26.0
PHP 5.6.40
MySQL 5.6.51

$ ss -lntp | grep -E ':(22|80|443|3306)\b'
LISTEN 22/ssh · 80/nginx · 3306/mysql
443 未监听(当前未部署 HTTPS)
现场容量与现有版本满足本次已部署系统复现;客户重新部署前仍应完成版本锁定、安装包 SHA256 校验和安全评审。

现场核验:Nginx 站点核心配置

配置来源:/usr/local/nginx/conf/vhost/172.16.70.36.conf(只读摘录)

Nginx vhost + ThinkPHP PATH_INFO
server {
    listen 80;
    server_name 172.16.70.36;
    index index.html index.htm index.php;
    root /data/wwwroot/sxityjydy3/public;

    include rewrite/thinkphp.conf;
    include enable-php-pathinfo.conf;

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
        expires 30d;
    }
    location ~ .*\.(js|css)?$ {
        expires 12h;
    }
    access_log /home/wwwlogs/172.16.70.36.log;
}

# rewrite/thinkphp.conf
location / {
    if (!-e $request_filename) {
        rewrite ^/(.*)$ /index.php/$1 last;
        break;
    }
}
if ($request_uri = "/") {
    return 301 /dist/;
}
PHP 通过 /tmp/php-cgi.sock 接入;open_basedir$document_root/../:/tmp/:/proc/。修改后必须先执行 Nginx 语法检查,再 reload。

现场核验:访问验证与待整改项

核验时间:2026-07-23 10:44–10:47 CST · 未执行写入、重启或配置变更

service and HTTP checks
$ nginx -t
syntax is ok
test is successful

$ service nginx status
$ service php-fpm status
$ service mysql status
nginx is running
php-fpm is running
MySQL is running

$ curl http://127.0.0.1/
301 → http://172.16.70.36/dist/

$ curl http://172.16.70.36/dist/
200 OK · 前端 JS/CSS 四项抽查均为 200
待整改 1:开机自启 运行服务未发现 rc3/rc5 启动链接,客户交付前需执行并验证 chkconfig 配置。
待整改 2:外部 CDN 前端仍引用 bootcss/unpkg;bootcss 在服务器当前网络下不可达,应改为本地静态资源或纳入网络白名单。
待整改 3:HTTPS 当前仅监听 80,未配置证书和 443;正式生产应按客户域名和证书策略补齐。
待整改 4:基础安全 SELinux disabled、firewalld inactive;须由客户安全团队确认边界防火墙、最小端口和数据库访问范围。