| Private Hosting Questions about VPS, dedicated servers and colocation. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
All Ur Base R Belong 2 Us
Excelling Contributor
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
|
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 |
|
|
|
|
|
#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. |
|
|
|
|
|
#3 (permalink) |
|
All Ur Base R Belong 2 Us
Excelling Contributor
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 |
|
|
|
|
|
#4 (permalink) |
|
All Ur Base R Belong 2 Us
Excelling Contributor
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 |
|
|
|