본문 바로가기

Study/Linux

httpd (을)를 시작 중: (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log.


[root@r /]#/etc/init.d/httpd restart
httpd 를 정지 중:                                          [실패]
httpd (을)를 시작 중: (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log.
Unable to open logs
                                                           [실패]
[root@r /]#/etc/init.d/httpd stop
httpd 를 정지 중:                                          [실패]
[root@r /]#/etc/init.d/httpd start
httpd (을)를 시작 중: (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log.
Unable to open logs
                                                           [실패]
[root@r /]#!v
vim iptables
[root@c.kr /]#/etc/init.d/
atd              dc_client        halt             iscsi            lm_sensors       netfs            proftpd          saslauthd        syslog
auditd           dc_server        hidd             iscsid           lvm2-monitor     netplugd         psacct           sendmail         sysstat
avahi-daemon     dnsmasq          httpd            isdn             mcstrans         network          rawdevices       shorewall        vsftpd
avahi-dnsconfd   dund             httpd.rpmorig    jexec            messagebus       nscd             rdisc            single           xfs
bluetooth        fail2ban         ip6tables        kdump            microcode_ctl    ossec            readahead_early  smartd           xinetd
capi             functions        iptables         killall          multipathd       pand             readahead_later  snmpd            ypbind
cpuspeed         gpm              irda             krb524           mysqld           pcscd            restorecond      snmptrapd        yum-updatesd
crond            haldaemon        irqbalance       kudzu            netconsole       portmap          rhnsd            sshd
[root@/]#vim /etc/sys
sysconfig/   sysctl.conf  syslog.conf
[root@ /]#vim /etc/sys
sysconfig/   sysctl.conf  syslog.conf
[root@kr /]#vim /etc/sysconfig/iptables
[root@ /]#cd /var/log
[root@/var/log]#ls
boot.log  brcm-iscsi.log  cron  dmesg  maillog  messages  mysqld.log  rpmpkgs  secure  spooler  wtmp  xferlog  yum.log
[root@ /var/log]#mkdir httpd
[root@kr /var/log]#ls
boot.log  brcm-iscsi.log  cron  dmesg  httpd  maillog  messages  mysqld.log  rpmpkgs  secure  spooler  wtmp  xferlog  yum.log
[root@.kr /var/log]#/etc/init.d/
atd              dc_client        halt             iscsi            lm_sensors       netfs            proftpd          saslauthd        syslog
auditd           dc_server        hidd             iscsid           lvm2-monitor     netplugd         psacct           sendmail         sysstat
avahi-daemon     dnsmasq          httpd            isdn             mcstrans         network          rawdevices       shorewall        vsftpd
avahi-dnsconfd   dund             httpd.rpmorig    jexec            messagebus       nscd             rdisc            single           xfs
bluetooth        fail2ban         ip6tables        kdump            microcode_ctl    ossec            readahead_early  smartd           xinetd
capi             functions        iptables         killall          multipathd       pand             readahead_later  snmpd            ypbind
cpuspeed         gpm              irda             krb524           mysqld           pcscd            restorecond      snmptrapd        yum-updatesd
crond            haldaemon        irqbalance       kudzu            netconsole       portmap          rhnsd            sshd
[root@r /var/log]#/etc/init.d/httpd restart
httpd 를 정지 중:                                          [실패]
httpd (을)를 시작 중:                                      [  OK  ]
[root@ac.kr /var/log]#


여점은 /var/log/httpd 폴더를 만들어주세요.