LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-06-2011, 07:00 AM   #1
Krayons
LQ Newbie
 
Registered: Jun 2011
Posts: 5

Rep: Reputation: Disabled
Apache2 Binding Issue


Hi Guys,

I am trying to get apache to listen to specific IP address and I have read up of the listen command (http://httpd.apache.org/docs/2.0/bind.html)

I can get virtual sites to work but not the apache it self.
Any idea in which config file to correct this.

Thanks in Advance
Kyle
 
Old 06-06-2011, 07:41 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you need to show us the config files and such. In what way is it not working? You actually listen on a port by setting the Listen directive, which isn't virtualhost specific.
 
Old 06-06-2011, 08:18 AM   #3
Krayons
LQ Newbie
 
Registered: Jun 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hope you mean this.

In /etc/apache2/

I have

apache2.conf
httpd.conf
mods-available
sites-enabled
conf.d
httpd.conf.save
mods-enabled
envvars
magic
ports.conf
sites-available

Now if I add <Listen My_IP:Port> to
apache2.conf
I get:
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
 
Old 06-06-2011, 08:53 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
somethings already on that port. Maybe another instance of apache.

A list of filenames is really really not useful. It's the contents that are useful.
 
Old 06-06-2011, 09:11 AM   #5
Krayons
LQ Newbie
 
Registered: Jun 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
It works perfectly when I remove the <Listen My_IP:Port>

Here are the contents

Quote:
Originally Posted by apache2.conf
LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
Include mods-enabled/*.load
Include mods-enabled/*.conf
Include httpd.conf
Include ports.conf
Include conf.d/
Include sites-enabled/
Quote:
Originally Posted by httpd.conf
*blank*

Quote:
Originally Posted by httpd.conf.save
*blank*
Quote:
Originally Posted by ports.conf
NameVirtualHost 91.121.135.xxx:80
Listen 80
<IfModule mod_ssl.c>
Listen 443
</IfModule>


Thanks for your help so far.
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
Thanks for the help so far.
 
Old 06-06-2011, 09:50 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right so you're defining a listen twice, so it's the same process that's already listening. I'm not at all familiar with this layout for apache config files, I would only suggest putting the Listen in the main apache2.conf, which I know as httpd.conf.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rport-3:0-0: blocked FC remote port time out: saving binding--qla issue ? knockout_artist Linux - Server 0 08-11-2009 03:22 PM
RHEL5 to Windows CA, Apache2/LDAP BINDing adrianmarsh Red Hat 1 04-05-2008 04:07 AM
Issue with Xemacs key binding jcubed Programming 0 02-15-2008 10:28 AM
Apache2 Host Issue anon266 Linux - Networking 10 11-14-2007 04:53 AM
Apache2 Interface Issue subcon Linux - Enterprise 2 08-08-2007 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration