# /etc/init.d/apache2 error /usr/sbin/apache2: No such file

## zerop2

when i run

/etc/init.d/apache2 restart

Apache2 has detected a syntax error in your configuration files:

env: /usr/sbin/apache2: No such file or directory 

where is wrong ?

any other trouble is 

i emerge apache got no space error

so i always clear with emerge --depclean and rm /usr/portages/distfiles/*.*

----------

## phajdan.jr

Looks like you're really running out of space.

1. post output of df -h (to be sure disk space is the problem)

2. clear /tmp, but don't remove .ICE-* dirs

----------

## zerop2

when i run 

/etc/init.d/apache2 restart 

Apache2 has detected a syntax error in your configuration files: 

env: /usr/sbin/apache2: No such file or directory 

so what 's wrong with this?

----------

## zerop2

filesystem       size    used    avail   use %   mount on 

/dev/hda4         3.5G   3.5G   0      100%       /

udev                247M    252K    247M   1%     /dev

/dev/da2          69M     13M         53%     20%   /boot

shm                247M    0      247 M     0%         /dev/shm

----------

## zerop2

just a kde-base occupy big space?

----------

## Monkeh

 *zerop2 wrote:*   

> just a kde-base occupy big space?

 

KDE is massive. And 3.5GB is not a big space..

----------

## zerop2

when i run 

/etc/init.d/apache2 restart 

Apache2 has detected a syntax error in your configuration files: 

env: /usr/sbin/apache2: No such file or directory 

where is wrong ? 

if i reintsall , can i fix the problem?

----------

## zerop2

i find two configuration files are the same

one path is /etc/apache2/httpd.conf

second path is /usr/lib/apache2/conf/httpd.conf

which one?

----------

## phajdan.jr

zerop2, don't panic. You don't have apache2 binary, because there is no space left on your root (/) partition. The problem is not about your config file (which is in /etc btw). The error message you get is clear:

/usr/sbin/apache2: No such file or directory

So you have to somehow free some space on your / partition and re-emerge apache. Don't think about config file now.

----------

## zerop2

i use parition magic increase more 41 M space

and emerge apache again

now /etc/init.d/apache2 restart

Start apache2 ....ok

[warn]  NameVirtualHOst *:80 has no Virtual Host 

i use another computer xp and open internet explorer to see 

but nothing

telnet X.X.X.X 80

no response 

what happen ? what should i do?

----------

## phajdan.jr

Try searching... maybe this topic will help you. Don't forget about google   :Wink: 

----------

## SoylentGreen

 *zerop2 wrote:*   

> i use parition magic increase more 41 M space
> 
> 

 

if you continue to use partitionmagic on linux filesystems i am almost sure that you will find yourself with VERY VERY much space RSN  :Laughing: 

dont do that, use parted.

 *zerop2 wrote:*   

> 
> 
> [warn]  NameVirtualHOst *:80 has no Virtual Host 
> 
> 

 

so you have to configure apache first, to your very own desire. there is a lot of documentation about this. use the search function. also there are very well documented sample configurationfiles already on your harddisk. check those.

 *zerop2 wrote:*   

> 
> 
> telnet X.X.X.X 80
> 
> no response 
> ...

 

again: telnet has nothing to do with apache, and not with ssh either!

 *zerop2 wrote:*   

> 
> 
> Kenerl Hacking Babie 
> 
> 

 

 :Laughing: 

----------

## phajdan.jr

 *SoylentGreen wrote:*   

> telnet has nothing to do with apache

 

But you can test whether it's possible to connect like zerop2 did. You can even write http request by hand and get a response using telnet.

----------

## SoylentGreen

 *_ph wrote:*   

> 
> 
> But you can test whether it's possible to connect like zerop2 did. You can even write http request by hand and get a response using telnet.

 

sure, it just reminded me on this thread:

https://forums.gentoo.org/viewtopic-t-460316-highlight-.html  :Razz: 

anyway, his apache didnt even start, because there is an error in his config. period.

i *guess* he has "vhosts" in his USEflags, but didnt create his vhost.conf. but this is just a guess.

or is apache actually started, and the output is just a warning? well, we will never know until he posts the output of "/etc/init.d/apache status".

----------

