# Starting Apache...

## Canadian Chris

Just emerged apache, mod_php, and mysql....after doing tweaking to the apache config file (adding the APACHE2_OPTS="-D SSL -D PHP4") I'm getting this error:

```

 * Starting apache2...

[Fri Oct 17 16:53:14 2003] [crit] (92)Protocol not available: make_sock: for address [::]:80, apr_socket_opt_set: (IPV6_V6ONLY)

no listening sockets available, shutting down

Unable to open logs

                                                                                                                      [ !! ]

```

What can I do to fix that?  Thanks...

----------

## BitJam

Do you have the ipv6 use flag set?  Are you using ipv6 sockets?

----------

## Canadian Chris

I'm not sure    :Embarassed: 

----------

## BitJam

Did you make any changes to the Apache config files?   Can you start it without SSL or PHP4?

----------

## Canadian Chris

I had added 

```

APACHE2_OPTS="-D SSL -D PHP4"

```

to /etc/conf.d/apache2, but even if I comment it out, I still get the same error message.  (and hence can't run apache)

I tried re-emering apache and adding -ipv6 to my use flags, but that didn't help.Last edited by Canadian Chris on Sat Oct 18, 2003 5:34 pm; edited 1 time in total

----------

## Canadian Chris

I will note that I messed up some of my /etc/ files a couple days back, so if there's some configuration that should be in one of those, it might be a problem.

----------

## BitJam

I don't know how to solve your problem.  The only suggestion I have is to look very closely at all of your (appropriate) /var/log/ files and the output of dmesg for more information about what is wrong.

----------

## Canadian Chris

alright, thx anyways

----------

## celloandy

I'm having the same problem.  Apache was working one day, then I did an "emerge -u world" and an "etc-update," and it died.  Now it won't start.

Andrew

----------

## BitJam

I emerged apache (2.0.47) four days ago (Oct 15th) and it started flawlessly with: 

```
 APACHE2_OPTS="-D SSL -D RUBY"
```

But I haven't done an "emerge -up world" in a long time.  There are 69 packages that are listed as needing an update.   It is possible that one of these packages is causing your problem.  

I can weed out most of them as irrelavant and am left with this short list: 

```
 [ebuild     U ]sys-devel/gcc-3.2.3-r2 [3.2.3-r1]

[ebuild     U ] dev-libs/glib-2.2.3 [2.2.2]

[ebuild     U ] sys-apps/iproute-20010824-r4 [20010824-r3]

[ebuild     U ] sys-apps/tcp-wrappers-7.6-r6 [7.6-r4]

[ebuild     U ] net-nds/portmap-5b-r7 [5b-r6]

[ebuild  N    ] dev-libs/libmal-0.31
```

My bet would be that maybe it is iproute that is causing this problem.   If you have the most recent version installed, you could try downgrading it and see if that fixes the problem.

----------

## celloandy

The thing is, at least on my box, mysql and other server daemons are still functioning.  I may give the iproute thing a try in a little while, but I suspect that the problem occured with the etc-update, and that I botched a config file accidently.  Just a guess, though.

Andy

----------

## Old Wolf

 *Canadian Chris wrote:*   

> Just emerged apache, mod_php, and mysql....after doing tweaking to the apache config file (adding the APACHE2_OPTS="-D SSL -D PHP4") I'm getting this error:
> 
> ```
> 
>  * Starting apache2...
> ...

 

I'm getting the exact same error as this, after emerging apache today. Anyone got any ideas, it's more than a little frustrating.

----------

## Old Wolf

Does anyone have any idea's how to solve this? I really need to get apache working...

----------

## Old Wolf

okokok - I found the answer out:

edit apache2.conf, and change Listen 80 to Listen 0.0.0.0:80, and edit /etc/conf.d/apache2 and take out -D SSL, and it should work. dunno how to get get SSL to work though...Last edited by Old Wolf on Wed Oct 22, 2003 5:21 pm; edited 1 time in total

----------

## BitJam

 *Old Wolf wrote:*   

> okokok - I found the answer out:
> 
> edit apache2.conf, and change Listen 80 to Listen 0.0.0.0:80, and edit /etc/init.d/apache2 and take out -D SSL, and it should work. dunno how to get get SSL to work though...

 

You could probably play the same trick on the /etc/apache2/modules.d/40_mod_ssl.conf file that contains the line: 

```
 listen 443 
```

----------

## Old Wolf

 *BitJam wrote:*   

> You could probably play the same trick on the /etc/apache2/modules.d/40_mod_ssl.conf file that contains the line: 
> 
> ```
>  listen 443 
> ```
> ...

 

Well, on my box it was here: /etc/apache2/conf/modules.d/40_mod_ssl.conf but it's still worked a treat!

Thanks for the help.

----------

## BitJam

 *Old Wolf wrote:*   

> Well, on my box it was here: /etc/apache2/conf/modules.d/40_mod_ssl.conf 

 

My bad.

----------

## Canadian Chris

Just on a note, YOU RULE!  Mine works too now.

Hype hype hype   :Very Happy: 

----------

## tukak

works for me too, thank you very much  :Smile: 

----------

## stormer

This works perfect for ssl too!

p.s. I'm getting this, what should I change!

```
apache2: Could not determine the server's fully qualified domain name, using 192.168.2.11 for ServerName 
```

----------

## BitJam

 *stormer wrote:*   

> This works perfect for ssl too!
> 
> p.s. I'm getting this, what should I change!
> 
> ```
> ...

 

Uncomment the the following line found in /etc/apache2/conf/apache2.conf and fill in the appropriate name: 

```
#ServerName localhost 
```

----------

## joker0225

Thanks!!!!!!!!!!!!!!!  :Very Happy:   :Very Happy:   :Very Happy: 

----------

## meulie

Thanks everyone!  The 0.0.0.0:[port] thingie helped on my machine as well!    :Cool: 

But(t)... what made it break in the first place...?      :Question: 

----------

## sveini

 *meulie wrote:*   

> Thanks everyone!  The 0.0.0.0:[port] thingie helped on my machine as well!   
> 
> But(t)... what made it break in the first place...?     

 

For some reason apache used ipv6 by default. If your computer isn't set up with ipv6, it fails trying to start apache.

By the use of 0.0.0.0:[port] you force apache to use ipv4 instead.

Thats why.. But why it is set up to use ipv6 is another story...  :Smile: 

----------

## BitJam

 *sveini wrote:*   

> For some reason apache used ipv6 by default. If your computer isn't set up with ipv6, it fails trying to start apache.
> 
> By the use of 0.0.0.0:[port] you force apache to use ipv4 instead.
> 
> Thats why.. But why it is set up to use ipv6 is another story... 

 

Another wrinkle:  I've got the most recent Apache2 installed and I don't have this problem nor do I have any ipv6 stuff enabled.   I do have a problem stopping Apache via the init.d script but that is probably a separate issue.

----------

## Benny007

thank you very much.

Add 0.0.0.0 before listening port works.  :Very Happy: 

----------

## tecknojunky

I tried just about everything in this forum, but I still get the make_sock error.  I think i'll get this solved by emerging apache1.

It's bad enough that gentoo as moved the root folder elsewhere, breaking all my scripts, other ebuilds still putting stuffs in /home/httpd, I really don't need to battle against apache versions woes.  :Evil or Very Mad: 

----------

## ToddWest

Thank you so much for figuring out this fix. I did an "emerge world" and it messed something up and Apache would no longer start, this fix worked perfectly. Thank you.   :Very Happy: 

----------

## scarr

For information, this issue is tracked as:

https://bugs.gentoo.org/show_bug.cgi?id=32389

An attachment is there that fixes the problem with Apache.

----------

