Error : (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
Child httpd processes still running and you cannot restart Apache? this is how I fixed the issue of "(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443". If you are getting the error message above it is most likely due to httpd stopping or failing in a faulty manner, you should use the -k graceful option which will advise child processes of httpd to exit after they have completed serving requests, at which time a new 'batch' of child servers can derive from the new confiuration.
Anyways first you need to figure out the PID or process ID listening to the port specified (80 or 443 in my case):
$ lsof -i :80
Kill the httpd child process(es):
$ kill -9 PID
Then find httpd:
$ whereis httpd
Start apache:
$ /usr/sbin/httpd -k start
Reset Plesk’s admin password on windows Server., Reset Plesk’s admin password in Plesk Hosting
Reset Plesk’s admin password on windows Server :
Login to windows server via RDP as a administrator, then open command prompt and run following commands :
C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe
execute this file and you will be prompted to enter in a new password for your “admin” plesk user.
You can then log into the plesk interface again and use as normal.
Setting up Private Nameservers in Cpanel
This guide will show you the ropes in how to setup cpanel nameservers and configure them properly so you can run ns1 and ns2.yoursite.com. Once your nameservers are setup clients can then use your own private nameservers for their domains.
1. Regiser your domain
Register the domain name you would like to use, you can register a domain here if you need one.This domain will be used as your nameservers - eg ns1.yourdomain.com and ns2.yourdomain.com
2. Additional IPs
Have 2 available IP addresses for your server that aren't in use.You will need to contact you provider to obtain these IP addreses.
3. Registering the Nameservers
Now login to your domain management page for the domain you registered and register ns1.newdomain.com and ns2.newdomain.com as nameservers (registries normally have a special facility for doing that). The registry may also have a facility to propogate these nameservers around the foreign registries - if so, you should use this facility.
These registrations may take a few days to propagate (often as many as 3 days).
4. Reverse DNS
You may also need to get your data centre to enter a reverse DNS pointer for your nameservers. You'll need to let them know each nameserver and its IP address. Sometimes you can suffer non-delivery of mail if you don't so this. Reverse DNS pointers can take a while to propagate.
Setup a reverse on the IP address for your domain
5. Broken NDC/BIND
My version of WHM/CPanel came with a broken NDC.
To fix this:
SSH into your box as root.
(a) Type: cd /scripts
(b) Type: ./updatenow
(c) Type: ./fixndc
Go back into WHM, go to the Restart Services section in the left menu and click DNS/Nameserver (BIND).
You will need to do this if you start getting 'ndc' errors when you are doing anything DNS related in WHM.
6. Setup Nameservers In WHM
Go into WHM (Web Host Manager) and select Edit Setup from the Server Setup menu on the left. Enter ns1.newdomain.com in the Primary Nameserver field. Hit 'Assign IP Address', then hit 'Add an A Entry for this nameserver'.
Repeat this process for the Secondary Nameserver field.
7. Tidy Up Junk Nameservers
Go into WHM (Web Host Manager) and select Manage Nameserver IPs from the Server Setup menu on the left. Remove any nameservers you don't recognise. This is just a tidy up exercise in case anyone's set anything up on the box before you.
8. Initial Nameserver Setup
Go into WHM (Web Host Manager) and select Initial NameServer Setup from the Server Setup menu on the left. Run this.
9. Restart BIND
Restart BIND (step 7 restarts BIND, but we've known it to need a proper stop and start for it to work) from SSH with:
service named stop
service named start
10. Manual Checks
I don't know what it is about this process, but it doesn't always work, so there are some things you can check manually via SSH.
/etc/wwwacct.conf
Check that the nameservers are correctly specified on NS, NS2 etc.
EG: scroll to the name servers section.....
NS ns1.yournameserver.com
NS2 ns2.yournameserver.com
/etc/resolv.conf
Check that there are nameserver entries for each IP. There may also be one for 127.0.0.1 - this is okay. I'm led to believe (by the 'man' entry for resolv.conf) that this isn't a particularly important file, but I changed mine to read:
domain mybox.com
search mybox.com
nameserver 127.0.0.1
nameserver 111.111.111.111
nameserver 222.222.222.222
Where 'mybox.com' is the main domain of my server, and '111.111.111.111' and '222.222.222.222' are the IP addresses of my primary and secondary nameservers.
resolv.conf is used to lookup names that are not in FQDN format.
/etc/nameserverips
Check that there are entries for each IP acting as a nameserver.
EG:
IP = ns1.yournameserver.com
IP = ns2.yournameserver.com
1. Regiser your domain
Register the domain name you would like to use, you can register a domain here if you need one.This domain will be used as your nameservers - eg ns1.yourdomain.com and ns2.yourdomain.com
2. Additional IPs
Have 2 available IP addresses for your server that aren't in use.You will need to contact you provider to obtain these IP addreses.
3. Registering the Nameservers
Now login to your domain management page for the domain you registered and register ns1.newdomain.com and ns2.newdomain.com as nameservers (registries normally have a special facility for doing that). The registry may also have a facility to propogate these nameservers around the foreign registries - if so, you should use this facility.
These registrations may take a few days to propagate (often as many as 3 days).
4. Reverse DNS
You may also need to get your data centre to enter a reverse DNS pointer for your nameservers. You'll need to let them know each nameserver and its IP address. Sometimes you can suffer non-delivery of mail if you don't so this. Reverse DNS pointers can take a while to propagate.
Setup a reverse on the IP address for your domain
5. Broken NDC/BIND
My version of WHM/CPanel came with a broken NDC.
To fix this:
SSH into your box as root.
(a) Type: cd /scripts
(b) Type: ./updatenow
(c) Type: ./fixndc
Go back into WHM, go to the Restart Services section in the left menu and click DNS/Nameserver (BIND).
You will need to do this if you start getting 'ndc' errors when you are doing anything DNS related in WHM.
6. Setup Nameservers In WHM
Go into WHM (Web Host Manager) and select Edit Setup from the Server Setup menu on the left. Enter ns1.newdomain.com in the Primary Nameserver field. Hit 'Assign IP Address', then hit 'Add an A Entry for this nameserver'.
Repeat this process for the Secondary Nameserver field.
7. Tidy Up Junk Nameservers
Go into WHM (Web Host Manager) and select Manage Nameserver IPs from the Server Setup menu on the left. Remove any nameservers you don't recognise. This is just a tidy up exercise in case anyone's set anything up on the box before you.
8. Initial Nameserver Setup
Go into WHM (Web Host Manager) and select Initial NameServer Setup from the Server Setup menu on the left. Run this.
9. Restart BIND
Restart BIND (step 7 restarts BIND, but we've known it to need a proper stop and start for it to work) from SSH with:
service named stop
service named start
10. Manual Checks
I don't know what it is about this process, but it doesn't always work, so there are some things you can check manually via SSH.
/etc/wwwacct.conf
Check that the nameservers are correctly specified on NS, NS2 etc.
EG: scroll to the name servers section.....
NS ns1.yournameserver.com
NS2 ns2.yournameserver.com
/etc/resolv.conf
Check that there are nameserver entries for each IP. There may also be one for 127.0.0.1 - this is okay. I'm led to believe (by the 'man' entry for resolv.conf) that this isn't a particularly important file, but I changed mine to read:
domain mybox.com
search mybox.com
nameserver 127.0.0.1
nameserver 111.111.111.111
nameserver 222.222.222.222
Where 'mybox.com' is the main domain of my server, and '111.111.111.111' and '222.222.222.222' are the IP addresses of my primary and secondary nameservers.
resolv.conf is used to lookup names that are not in FQDN format.
/etc/nameserverips
Check that there are entries for each IP acting as a nameserver.
EG:
IP = ns1.yournameserver.com
IP = ns2.yournameserver.com
How to reduce the size of usr by cropping Domlogs
Copy the following contents to a file and execute it.
#!/bin/bash
for domain in /usr/local/apache/domlogs/*;
do
# Find the domain having more than 100 Mb log file size
if [ 3000 -lt `du $domain | awk {'print $1'} 2> /dev/null` ]
then
{
echo $domain;
echo “splitting the file into sizes of 50 Mb each…”;
/usr/local/cpanel/bin/cpuwatch 7.0 split -b 2m $domain ${domain};
echo “Appending the last two sets of files generated”;
for i in `ls ${domain}a*| tail -n 2`;
do
tail -n 2 $i;echo $i;
cat $i >> ${domain}.test;
done
}
cp -f ${domain}.test ${domain};
rm -f ${domain}a* ${domain}.test;
echo “done”;
fi
#!/bin/bash
for domain in /usr/local/apache/domlogs/*;
do
# Find the domain having more than 100 Mb log file size
if [ 3000 -lt `du $domain | awk {'print $1'} 2> /dev/null` ]
then
{
echo $domain;
echo “splitting the file into sizes of 50 Mb each…”;
/usr/local/cpanel/bin/cpuwatch 7.0 split -b 2m $domain ${domain};
echo “Appending the last two sets of files generated”;
for i in `ls ${domain}a*| tail -n 2`;
do
tail -n 2 $i;echo $i;
cat $i >> ${domain}.test;
done
}
cp -f ${domain}.test ${domain};
rm -f ${domain}a* ${domain}.test;
echo “done”;
fi
Subscribe to:
Posts (Atom)