# apache22 is not running



## flamingsteam (Dec 20, 2009)

i started the apache22 and it says

"Syntax OK
Starting apache22" 

but when i checked the status, apache22 is not running... it says 
"apache22 is not running."
why is it? can somebody help me on this problem?


----------



## DutchDaemon (Dec 20, 2009)

Have you looked at your error log (/var/log/httpd-error.log)? If yes, what's in there, and if no, why not?


----------



## dennylin93 (Dec 22, 2009)

There was a similar case before. Check if the hostname is set properly.


----------



## potobenka (Jan 9, 2010)

i have the same problem. log error:

```
[Thu Jan 07 01:41:51 2010] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "nothing.com"
Configuration Failed
[Thu Jan 07 01:47:05 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jan 07 01:47:05 2010] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "nothing.com"
Configuration Failed
[Thu Jan 07 01:51:24 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jan 07 01:51:24 2010] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "nothing.com"
Configuration Failed
```


----------



## potobenka (Jan 9, 2010)

any help?


----------



## SirDice (Jan 9, 2010)

Check if the hostname is set properly. Not only in your httpd.conf but also in rc.conf. Double check to make sure name resolving works.


----------



## potobenka (Jan 9, 2010)

i've checked all the files already(hosts, httpd.conf, rc.conf, host.conf) to no avail.


----------



## potobenka (Jan 9, 2010)

I tried running apache22 as regular(not root)user. I got this:

```
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
```
could this be causing the problem?


----------



## sixtydoses (Jan 9, 2010)

potobenka said:
			
		

> I tried running apache22 as regular(not root)user. I got this:
> 
> cout this be causing the problem???



Only root can bind to privileged ports (< 1024).


----------



## semprix (Jan 9, 2010)

potobenka said:
			
		

> I tried running apache22 as regular(not root)user. I got this:
> 
> cout this be causing the problem???



No this isn't causing the problem, non-root user dont have the permission to bind sockets.


----------



## sixtydoses (Jan 9, 2010)

AFAIK if you run httpd as root, it'll fall back to a user and group specified in the httpd.conf (by default it's 'nobody', I think). If you still want to run it as a non-root user, use port above 1024.


----------



## BeautifulFish (Jan 11, 2010)

how about disabling mod_unique_id in httpd.conf?


----------



## ahankinson (Jan 15, 2010)

Either disable mod_unique_id in your httpd.conf file or make sure "nothing.com" resolves to your local machine.

I think you can get around that by putting your machine's IP address in the hostname section of your httpd.conf file.


----------



## SirDice (Jan 15, 2010)

semprix said:
			
		

> non-root user dont have the permission to bind sockets.


Yes, they do. As long as the port is above 1024.


----------

