banbanbai 发表于 2016-12-31 07:52:58

web apache 常用命令

web apache 常用命令


httpd -k start

httpd -k stop

1、netstat -an | grep 80
2、查看httpd进程数(即prefork模式下Apache能够处理的并发请求数):
  Linux命令:
引用ps -ef | grep httpd | wc -l
3、netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S}'
  (这条语句是从 新浪互动社区事业部技术总监王老大那儿获得的,非常不错)
  返回结果示例:
  LAST_ACK 5
  SYN_RECV 30
  ESTABLISHED 1597
  FIN_WAIT1 51
  FIN_WAIT2 504
  TIME_WAIT 1057
  其中的SYN_RECV表示正在等待处理的请求数;ESTABLISHED表示正常数据传输状态;TIME_WAIT表示处理完毕,等待超时结束的请求数。
Redhat9中Apache服务器默认配置重要信息总汇:

配置文件:/etc/httpd/conf/http.cnf
服务器的根目录:/etc/httpd
根文档目录:/var/ww/html
访问日志文件:/var/log/httpd/access_log
错误日志文件:/var/lgo/httpd/error_log
运行Apache的用户:apache
运行Apache的组:apache
端口:80
模块存放路径:/usr/lib/httpd/moudules
prefork MPM运行方式的参数:

StartServer 8
MinSpareServices 5
MaxSpareServer 20
MaxClients 150
MaxrequestsPerChild 1
wrong ELF class: ELFCLASS64
页: [1]
查看完整版本: web apache 常用命令