如何启动Apache
- 优惠信息:未填写
- 地址:广东省东莞市莞城街道汇峰路1号汇峰中心B区501单元
- 联系人:盛网科技
- 联系电话:点击查看完整号码
详情介绍
我在一台RHEL4上编译安装了Apache,用了全默认参数,使用下面命令启动
/usr/local/apache/bin/apachectl start
看系统里的情况
[root*nf]# ps -ef | grep httpd | grep -v grep
root???? 32485???? 1? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32486 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32487 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32488 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32489 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32490 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
[root*nf]# cat*nf | grep daemon
# httpd daemons, you will need to change at least LockFile and PidFile.
User daemon
Group daemon??? # socket used*municate with the CGI daemon of mod_cgid.
试下把daemon改成root看看
[root*nf]# /usr/local/apache/bin/apachectl start
Syntax error on line 65 of /usr/local*nf*nf:
Error:\tApache has not been designed to serve pages while\n\trunning as root.? There are known*nditions 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*nf file to list a non-root\n\tuser.\n
[root*nf]# cat*nf | grep root
# httpd as root initially and it will switch.?
User root
Group root
可以看到,Apache根本不给你启动!
根据Apache的文档里这么描述
?? 如果配置文件中Listen定义的是默认的80端口(或1024以下),那么启动Apache将需要root权限以将它绑定在特权端口上。一旦服务器开始启动并完成了一些诸如打开日志文件之类的准备操作,它将创建很多子进程来完成一些诸如侦听和回应客户端请求的工作。
?? httpd主进程仍然以root用户的权限运行,而它的子进程将以一个较低权限的用户运行。这将由你选择的多路处理模块进行控制。
三三在线www*/,服务器租用 托管 高防服务器租用,机柜大带宽租用,我司有:四川德阳机房,广东佛山机房,大朗机房,松山湖机房,香港机房CN2,杭州BGP高防,新加坡机房,菲律宾,韩国,日本 美国,高防 无防服务器。企点Q:2852361322电话:13924367540
联系我的时候请说是在搜即讯信息网上看到的,谢谢。
/usr/local/apache/bin/apachectl start
看系统里的情况
[root*nf]# ps -ef | grep httpd | grep -v grep
root???? 32485???? 1? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32486 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32487 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32488 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32489 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
daemon?? 32490 32485? 0 21:50 ???????? 00:00:00 /usr/local/apache/bin/httpd -k start
[root*nf]# cat*nf | grep daemon
# httpd daemons, you will need to change at least LockFile and PidFile.
User daemon
Group daemon??? # socket used*municate with the CGI daemon of mod_cgid.
试下把daemon改成root看看
[root*nf]# /usr/local/apache/bin/apachectl start
Syntax error on line 65 of /usr/local*nf*nf:
Error:\tApache has not been designed to serve pages while\n\trunning as root.? There are known*nditions 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*nf file to list a non-root\n\tuser.\n
[root*nf]# cat*nf | grep root
# httpd as root initially and it will switch.?
User root
Group root
可以看到,Apache根本不给你启动!
根据Apache的文档里这么描述
?? 如果配置文件中Listen定义的是默认的80端口(或1024以下),那么启动Apache将需要root权限以将它绑定在特权端口上。一旦服务器开始启动并完成了一些诸如打开日志文件之类的准备操作,它将创建很多子进程来完成一些诸如侦听和回应客户端请求的工作。
?? httpd主进程仍然以root用户的权限运行,而它的子进程将以一个较低权限的用户运行。这将由你选择的多路处理模块进行控制。
三三在线www*/,服务器租用 托管 高防服务器租用,机柜大带宽租用,我司有:四川德阳机房,广东佛山机房,大朗机房,松山湖机房,香港机房CN2,杭州BGP高防,新加坡机房,菲律宾,韩国,日本 美国,高防 无防服务器。企点Q:2852361322电话:13924367540
联系我的时候请说是在搜即讯信息网上看到的,谢谢。
发布发布一条信息东莞网站建设推广信息>>
- Sojixun33197
还没有店铺网站,现在立刻去申请
- 注册时间:2017-11-10
- 该用户的其他信息
- 国外直播服务器租用哪家好
- 动态IP服务器的是什么?
- 查看TA发布的更多信息 >
东莞附近网站建设推广
- 莞城区网站建设推广
- 南城区网站建设推广
- 万江区网站建设推广
- 东城区网站建设推广
- 石碣镇网站建设推广
- 石龙镇网站建设推广
- 茶山镇网站建设推广
- 石排镇网站建设推广
- 企石镇网站建设推广
- 横沥镇网站建设推广
- 桥头镇网站建设推广
- 谢岗镇网站建设推广
- 东坑镇网站建设推广
- 常平镇网站建设推广
- 寮步镇网站建设推广
- 大朗镇网站建设推广
- 黄江镇网站建设推广
- 清溪镇网站建设推广
- 塘厦镇网站建设推广
- 凤岗镇网站建设推广
- 长安镇网站建设推广
- 虎门镇网站建设推广
- 厚街镇网站建设推广
- 沙田镇网站建设推广
- 道滘镇网站建设推广
- 麻涌镇网站建设推广
- 其他网站建设推广
- 大岭山网站建设推广
- 樟木头网站建设推广
- 高埗网站建设推广
- 中堂网站建设推广
赞助商广告