Page 1 of 2
Httpd Can't start
Posted: Fri Feb 15, 2013 5:33 am
by zik
Good Day ,
I fixed one problem and I still have small one , if you can help me .
When I start the service httpd gave me this error:
Code: Select all
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log.
Unable to open logs
Normaly I cheked in hosts file I have like in the past :
127.0.0.1 Nagiose localhost.localdomain localhost
Searching in google I found that they recomend to add ServerName localhost in httpd.conf file ?
Many Thanks
All The Best
Re: Httpd Can't start
Posted: Fri Feb 15, 2013 10:24 am
by slansing
Yes, google was correct

This should fix your issue, HTTPD should be started but it will give you that notification, which can be annoying.
Re: Httpd Can't start
Posted: Fri Feb 15, 2013 4:11 pm
by zik
excuse me what they mean ServerName localhost ? mean DNS server name ? and in the past I didn't touch this file httpd and it working .
Re: Httpd Can't start
Posted: Fri Feb 15, 2013 4:28 pm
by lmiltchev
You may get this message:
Code: Select all
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
but the httpd may still be running.
What do you have in the hosts file?
Do you have something like this?
Code: Select all
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Re: Httpd Can't start
Posted: Fri Feb 15, 2013 4:46 pm
by zik
In the hosts file I have like this :
Code: Select all
127.0.0.1 Nagiose localhost.localdomain localhost
10.5.5.1 Server.domainename.com Server
can you help me please .
Many Thanks
Re: Httpd Can't start
Posted: Sun Feb 17, 2013 2:08 pm
by zik
good day ,
can somone help me or advice me , I will be thankful .
Many Thanks
Regards
Re: Httpd Can't start
Posted: Mon Feb 18, 2013 10:32 am
by slansing
All you need to do is change it to look like what Lmiltchev showed, do not change the IP's though.
Re: Httpd Can't start
Posted: Mon Feb 18, 2013 10:57 am
by zik
excuse me after cheking:
Code: Select all
[root@server etc]# ls -l /etc/httpd/
total 8
drwxr-xr-x 2 root root 4096 févr. 26 2010 conf
drwxr-xr-x 2 root root 4096 janv. 12 2010 conf.d
lrwxrwxrwx 1 nagios apache 19 déc. 22 2009 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root 27 déc. 22 2009 modules -> ../../usr/lib/httpd/modules
lrwxrwxrwx 1 root root 13 déc. 22 2009 run -> ../../var/run
the line logs -> ../../var/log/httpd is red
Code: Select all
[root@server log]# ls -l /var/log/httpd/
ls: no access /var/log/httpd/:No such file
maybe i don't have permission in the file ?
Many Thanks
Re: Httpd Can't start
Posted: Mon Feb 18, 2013 11:09 am
by slansing
You should have permissions to see the logs from root. However that is just what they are, logs, they should not prevent HTTPD from starting on their own, you need to make the changes we suggested and then we will work on your other issue. Have you ever seen the Nagios Core web UI from this system? Or is this a fresh install.
Lets also check to see if the distro's install of apache did not place them somewhere else..:
Run the following and place the output back here:
What Distro and version of Nagios Core are you using?
Re: Httpd Can't start
Posted: Mon Feb 18, 2013 11:37 am
by zik
thank you very much .
no this is an old server because in the past I had one problem that logs was full , so the server can start , delete all logs maybe by mistake I delete the httpd
the version of nagios is :Nagios Core 3.2.0
Code: Select all
[root@server log]# ls -al /etc/httpd/logs
lrwxrwxrwx 1 nagios apache 19 déc. 22 2009 /etc/httpd/logs -> ../../var/log/httpd
give me the line with color red strange
it s possible to reinstall and install httpd ?
Many Thanks