Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using apache to proxy my tomcat instance, and I would like apache to listen on both ports 80 and 8080. I have the given configuration. But when I try to start up I get the following error:

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down

Listen 8080
NameVirtualHost *:8080

Listen 80
NameVirtualHost *:80

<VirtualHost *:8080 *:80>

   <Proxy *>
     AddDefaultCharset Off
     Order deny,allow
     Allow from all
   </Proxy>

   ProxyPass / ajp://localhost:8009/
   ProxyPassReverse / ajp://localhost:8009/

</VirtualHost>

Is there a way to get apache to basically proxy all requests on 80 and 8080?

share|improve this question
    
Looks like you have another program already running listening on port 80. Linux? Try this to find out what it is: netstat -lnptu –  ETL Feb 20 '13 at 0:54
    
Oh right, apache is actually running on port 80. oops –  Jeff Storey Feb 20 '13 at 1:17

1 Answer 1

up vote 1 down vote accepted
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down

This error message means that there is something already listening on the port. On linux, the following command can give you the data as to what is listening.

netstat -lnptu
share|improve this answer
    
Yep, thanks. Forgot apache itself was running on 80 –  Jeff Storey Feb 20 '13 at 1:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.