搜索
首页 电子数码 手机/通讯 手机使用

如何重启apache daemo?

如何重启apache daemon

全部回答

2015-04-16

76 0

    Apache有漏洞服务器被黑了 我台RHEL4上编译安装了Apache用了全默认参数使用下面命令启动 /usr/local/apache/bin/apachectl start 看系统里情况 [root@localhost conf]# ps -ef | grep httpd | grep -v grep [root@localhost conf]# cat httpd。
    conf | grep daemon # httpd daemons, you will need to change at least LockFile and PidFile。
   User daemon Group daemon # socket used to communicate with the CGI daemon of mod_cgid。   试下把daemon改成root看看 [root@localhost conf]# /usr/local/apache/bin/apachectl start Syntax error on line 65 of /usr/local/apache/conf/httpd。
    conf: Error:\tApache has not been designed to serve pages while\n\trunning as root。 There are known race conditions that\n\twill allow any local user to read any file on the system。
    \n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server。
    \n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd。
  conf file to list a non-root\n\tuser。\n [root@localhost conf]# cat httpd。  conf | grep root # httpd as root initially and it will switch。
     User rootGroup root看Apache根本给启动 根据Apache文档里描述 配置文件Listen定义默认80端口(或1024下)启动Apache需要root权限绑定特权端口上旦服务器开始启动并完成了些诸打开日志文件之类准备操作创建多子进程来完成些诸侦听和回应客户端请求工作 httpd主进程仍root用户权限运行而子进程较低权限用户运行由选择多路处理模块进行控制 所用root启动Apache并存安全问题非root用户能启动1024下端口所非root启动Apache能启动80443端口时候再用iptable做跳转麻烦事情而且iptables性能也问题 像bind样程序使用chroot方式来解决权限控制问题用root启动样没有安全问题 有些时候些想法都人传人大多数人仔细想想找找内因 《赠人玫瑰手有余香,祝您好运一生一世,如果回答有用,请点“好评”,谢谢^_^!》。
  

2015-04-16

77 0

  如果配置文件中Listen定义的是默认的80端口(或1024以下),那么启动Apache将需要root权限以将它绑定在特权端口上。一旦服务器开始启动并完成了一些诸如打开日志文件之类的准备操作,它将创建很多子进程来完成一些诸如侦听和回应客户端请求的工作。
   httpd主进程仍然以root用户的权限运行,而它的子进程将以一个较低权限的用户运行。这将由你选择的多路处理模块进行控制。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电子数码
手机使用
MP4/MP3
手机/通讯
照相机/摄像机
手机/通讯
手机使用
手机购买
通讯服务
手机使用
手机使用
举报
举报原因(必选):
取消确定举报