I recently had the same issue and could not find a soultion until now. The best option turns out to be using
Redirect 404 /
or (as suggested earlier)
RedirectMatch 404 /.*
directive in the default (first) vhost, which obviously must be unused. The vhost can potentially be a 'fake' one, so something like following at the beginning of your vhost config file:
<VirtualHost *:80>
ServerName default #fake name, unused domains default here
Redirect 404 /
</VirtualHost>
<VirtualHost *.80>
ServerName example.tld
........
</VirtualHost>
Smells like a hack though.
Well after creating a dev server as an exact copy to try out new things I think I have figured it out. I'll put my process below and hopefully it will help others in the future.
First thing I did was change my ports to a different number so I could see what was still running on port:80.
sudo nano /etc/apache2/ports.conf
I had oringally:
Listen 80
Listen 443
so I changed them to:
Listen 88
Listen 443
This let me do go and see what all was running now on my ports using sudo netstat -lpAinet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:448 *:* LISTEN 4183/apache2
tcp 0 0 localhost:mysql *:* LISTEN 3741/mysqld
tcp 0 0 localhost:submission *:* LISTEN 3973/sendmail: MTA:
tcp 0 0 *:www *:* LISTEN 4025/apache2
tcp 0 0 *:ssh *:* LISTEN 3651/sshd
tcp 0 0 *:kerberos *:* LISTEN 4183/apache2
tcp 0 0 localhost:smtp *:* LISTEN 3973/sendmail: MTA:
tcp 0 0 *:https *:* LISTEN 4025/apache2
If you notice PID 4025 is running on *:www and on *:https. This is the apache instance that is messing the whole thing up. So doing a kill -9 {PID}
will kill that process for good. (honestly don't know what the kill -9 does but it worked for me. Someone might want to correct that if it's not fully correct.
My next output was great. One instance of apache running now. sudo netstat -lpAinet
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:448 *:* LISTEN 4183/apache2
tcp 0 0 localhost:mysql *:* LISTEN 3741/mysqld
tcp 0 0 localhost:submission *:* LISTEN 3973/sendmail: MTA:
tcp 0 0 *:webmin *:* LISTEN 4233/perl
tcp 0 0 *:ssh *:* LISTEN 3651/sshd
tcp 0 0 *:kerberos *:* LISTEN 4183/apache2
tcp 0 0 localhost:smtp *:* LISTEN 3973/sendmail: MTA:
udp 0 0 *:10000 *:* 4233/perl
Now that I have found the problem I changed my ports.conf sudo nano /etc/apache2/ports.conf
back to the original settings.
I simple apache stop sudo /etc/init.d/apache2 stop
and start sudo /etc/init.d/apache2 start
and things are working great. The real test for me was to reboot the server and see if it worked like it was suppossed to. Worked like a charm.
From a post I read about this with RedHat: http://www.linuxquestions.org/questions/linux-software-2/98-address-already-in-use-make_sock-could-not-bind-to-address-0-0-0-0-443-a-110753/#post1153056
The problem was because:
this problem is comes only if u
started the weberver and than made
some modification or tried to load the
jsp or asp support than u will find
http locked when u tried to restart
it.
So hopefully this will help out the ton of other people that I googled having the same issue but no real solutions. It worked for my case anyway. Btw - This might be also because I'm using a Cloud Server. Not sure.
Best Answer
The error means:
You can check the environment of a process with
ps e $PID
or withcat /proc/$PID/environ |sed 's/[\x0]/\n/g'
where PID is the process id.To find which library is using
curses
,ncurses
,slang
, check the binaries withldd
.