icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Private Hosting » WHM & Apache

Private Hosting Questions about VPS, dedicated servers and colocation.

Reply
 
LinkBack Thread Tools Search this Thread
Old March 14th, 2006, 10:55 PM   #1 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Question WHM & Apache

Does Cpanel start Apache differently than it normally starts without Cpanel?
The reason I ask this is because I've been getting this problem:

[crit] (98)Address already in use: make_sock: could not bind to port 80

I have another web server running on one of the ips for the server and have apache running on the rest.

The configuration is properly set up, because when I use apachectl to restart, it restarts with no problem. It only seems to happen when Cpanel is restarting Apache.

I had this problem when I first installed the server but (thought) I got it sorted out. Then yesterday and today the same problem happening again.
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 15th, 2006, 1:03 AM   #2 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2003
432 posts
Gave thanks: 0
Thanked 0 times
WHM uses /scripts/restartsrv_httpd*

I've not really looked at the code, but my guess is it's different than the standard httpd restart in the sbin. I would say that most likely, it's not able to shut down httpd, so you may want to do SSH httpd stop and a WHM restart.
__________________
Fw Web Solutions
http://fwwebs.com
fwwebs5 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 15th, 2006, 1:08 AM   #3 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
I should browse over that script.

When I first set things up I was having problems because I forgot the localhost ip for use with "Apache Status", and then I put :80 on all the virtual host entries, and everything seemed to be fine. Up until yesterday the Apache had an uptime of over 3 weeks. Then yesterday morning it failed and I saw that message in the error log again.

Thanks for the suggestion.
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 15th, 2006, 10:01 PM   #4 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
Well I went over the file, but most of the functionality is encapsulated in functions defined elsewhere. But the file did help some. I was reminded that WHM starts the service with the "-DSSL" option.

The directive in Apache is written as
<IfDefine SSL>
Listen 80
Listen 443
</IfDefine>

So that was the problem. It was causing it to try to listen to Port 80 for all IPs, and one's already in use, causing the issue. When I was using apachectl I didn't have SSL defined, that's why it worked fine with apachectl and not WHM's restart.

I just have to change that Define, replace Listen 80 with Listen [ip]:80 for all the ips available to Apache.
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On