# cannot start apache



## cpliu903 (Apr 6, 2009)

> freebsd# /usr/local/etc/rc.d/apache22 start
> Performing sanity check on apache22 configuration:
> Syntax OK
> Starting apache22.





> Server Setting:
> No DNS server.



cannot found the process in the "top" command.

what problem?


----------



## SirDice (Apr 6, 2009)

Look in the /var/log/messages and /var/log/http-error.log logfiles for clues.


----------



## vivek (Apr 6, 2009)

Also, sockstat -4 is correct way to see if port is opened or not by apache. 

```
sockstat -4 
sockstat -4 | grep :80
```


----------



## anomie (Apr 6, 2009)

Or: `% pgrep httpd`

*top* only shows top CPU consumers by default.


----------



## cpliu903 (Apr 7, 2009)

SirDice said:
			
		

> Look in the /var/log/messages and /var/log/http-error.log logfiles for clues.



/var/log/http-error.log:

[Tue Apr 07 19:45:10 2009] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "freebsd.localdomain"
Configuration Failed


how to fix?


----------



## DutchDaemon (Apr 7, 2009)

Change your hostname to something fully-qualified, like freebsd.domain.local in /etc/hosts and/or in rc.conf.


----------

