apache2 refuses to restart ( *:443 has no VirtualHosts)

Got problems with Bubba? Then this forum is for you.
Locked
dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

apache2 refuses to restart ( *:443 has no VirtualHosts)

Post by dan_bub » 09 Feb 2009, 06:17

Hi,
I got my Bubba Two a couple of weeks ago. I was in need to make a single folder within the webserver path password-protected. The how to " Enable password protection - .htaccess" from Magnus in this forum came in handy, but uuuuuh, when I reached the step to restart apache2, I couldn't manage it. The error-message is:

Code: Select all

bubba# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...[Mon Feb 09 10:51:40 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
[Mon Feb 09 10:51:40 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
httpd (no pid file) not running
[Mon Feb 09 10:51:41 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
[Mon Feb 09 10:51:41 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:443
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
 failed!
The only thing I had changed in

/etc/apache2/sites-enabled/bubba

by then was the part "AllowOverride None" into "AllowOverride All".
However, now I can't get into the admin-panel any more, because apache2 is down.
I tried desperatly

apt-get apt-get install bubba-frontend
apt-get apt-get install bubba-backend

which apparently helped somebody in this forum, but with no luck, and also

apt-get update
apt-get upgrade
apt-get -f install

did not help.
Any body can help me out on this one?

Thanks in advance
dan_bub

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 09 Feb 2009, 07:03

could you post your /etc/apache2/sites-enabled/bubba

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 09 Feb 2009, 08:00

This is the one in place now. It is a backup of the original script, which was working fine, before I touched it. :oops:

Code: Select all

cat /etc/apache2/sites-enabled/bubba
Listen 443

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile      /etc/apache2/cacert.pem
        SSLCertificateKeyFile   /etc/apache2/privkey.pem

        ServerAdmin webmaster@localhost

        DocumentRoot /home/web/
        DirectoryIndex index.html index.htm index.cgi index.pl index.php index.xhtml
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/web/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        Alias /icons/ "/usr/share/apache2/icons/"
        <Directory "/usr/share/apache2/icons">
                Options Indexes MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/web/
        DirectoryIndex index.html index.htm index.cgi index.pl index.php index.xhtml
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/web/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        Alias /icons/ "/usr/share/apache2/icons/"
        <Directory "/usr/share/apache2/icons">
                Options Indexes MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 09 Feb 2009, 08:16

die conf ziet er goed uit.
start je de boel wel als root ?

kan je de error.log eens sturen?
tail -100 /var/log/apache2/error.log

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 09 Feb 2009, 08:52

Hi,
here we go:

Code: Select all

bubba:/home/linnex# tail -100 /var/log/apache2/error.log
[Thu Jan 08 12:19:26 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jan 08 12:19:26 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Jan 08 12:19:27 2009] [notice] FastCGI: process manager initialized (pid 2579)
[Thu Jan 08 12:19:30 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jan 08 12:19:30 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Jan 08 12:19:30 2009] [notice] Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8cconfigured -- resuming normal operations
[Thu Jan 08 12:26:51 2009] [notice] caught SIGTERM, shutting down
[Wed Jan 14 10:48:33 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jan 14 10:48:33 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Wed Jan 14 10:48:34 2009] [notice] FastCGI: process manager initialized (pid 2527)
[Wed Jan 14 10:48:38 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jan 14 10:48:38 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Wed Jan 14 10:48:38 2009] [notice] Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8cconfigured -- resuming normal operations
[Wed Jan 14 11:46:46 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jan 14 11:46:46 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Wed Jan 14 11:46:47 2009] [notice] FastCGI: process manager initialized (pid 2532)
[Wed Jan 14 11:46:48 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jan 14 11:46:48 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Wed Jan 14 11:46:48 2009] [notice] Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8cconfigured -- resuming normal operations
[Thu Jan 15 08:49:56 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jan 15 08:49:56 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Jan 15 08:49:56 2009] [notice] FastCGI: process manager initialized (pid 2534)
[Thu Jan 15 08:50:00 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jan 15 08:50:00 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Jan 15 08:50:00 2009] [notice] Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8cconfigured -- resuming normal operations
[Thu Jan 15 09:39:56 2009] [notice] caught SIGTERM, shutting down
[Thu Jan 15 09:42:47 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jan 15 09:42:47 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Jan 15 09:42:47 2009] [notice] FastCGI: process manager initialized (pid 2522)
[Thu Jan 15 09:42:50 2009] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jan 15 09:42:50 2009] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!?
[Thu Jan 15 09:42:50 2009] [notice] Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8cconfigured -- resuming normal operations
[Sat Jan 17 17:16:17 2009] [error] [client 10.0.0.2] File does not exist: /home/web/fireline
[Sat Jan 17 17:16:22 2009] [error] [client 10.0.0.2] File does not exist: /home/web/firefly
[Sun Jan 18 08:43:06 2009] [error] [client 10.0.0.2] File does not exist: /usr/share/horde3/services/editor/xinha/lang/en_us.js, referer: http://10.0.0.3/pim/dimp/compose.php?type=new
[Sun Jan 18 08:43:06 2009] [error] [client 10.0.0.2] File does not exist: /usr/share/horde3/services/editor/xinha/plugins/ListType/lang/en_us.js, referer: http://10.0.0.3/pim/dimp/compose.php?type=new
[Sun Jan 18 08:43:06 2009] [error] [client 10.0.0.2] File does not exist: /usr/share/horde3/services/editor/xinha/plugins/CharacterMap/lang/en_us.js, referer: http://10.0.0.3/pim/dimp/compose.php?type=new
[Tue Jan 20 13:21:55 2009] [error] [client 10.0.0.2] FastCGI: comm with server "/usr/share/web-admin/admin/index.php" aborted: idle timeout (120 sec), referer: http://10.0.0.3/admin/settings/software
[Thu Jan 22 22:14:41 2009] [error] [client 217.157.195.218] File does not exist: /home/web/web-admin
[Thu Jan 22 22:14:52 2009] [error] [client 217.157.195.218] File does not exist: /home/web/web-admin
[Thu Jan 22 22:15:41 2009] [error] [client 217.157.195.218] File does not exist: /home/web/web-admin
[Thu Jan 22 22:15:55 2009] [error] [client 217.157.195.218] File does not exist: /home/web/web-admin
[Fri Jan 23 23:38:48 2009] [error] [client 129.142.110.98] File does not exist: /home/web/home
[Fri Jan 23 23:39:40 2009] [error] [client 129.142.110.98] File does not exist: /home/web/*
[Mon Jan 26 10:27:45 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Mon Jan 26 10:27:55 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Mon Jan 26 10:28:06 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Mon Jan 26 10:28:13 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Mon Jan 26 10:28:45 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Mon Jan 26 10:29:11 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Mon Jan 26 10:32:02 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Mon Jan 26 10:32:13 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Mon Jan 26 10:32:16 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Mon Jan 26 10:32:21 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Mon Jan 26 10:32:25 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Thu Jan 29 23:31:05 2009] [error] [client 217.157.195.218] File does not exist: /home/web/doku
[Thu Jan 29 23:31:14 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Thu Jan 29 23:33:03 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Thu Jan 29 23:33:09 2009] [error] [client 217.157.195.218] File does not exist: /home/web/web
[Sat Jan 31 23:39:28 2009] [error] [client 217.157.195.218] File does not exist: /home/web/web
[Sun Feb 01 09:07:42 2009] [error] [client 129.142.110.98] File does not exist: /home/web/we
[Sun Feb 01 09:07:45 2009] [error] [client 129.142.110.98] File does not exist: /home/web/web
[Sun Feb 01 09:07:53 2009] [error] [client 129.142.110.98] File does not exist: /home/web/web
[Sun Feb 01 09:07:59 2009] [error] [client 129.142.110.98] File does not exist: /home/web/web
[Sun Feb 01 12:04:09 2009] [error] [client 129.142.110.98] File does not exist: /home/web/web
[Sun Feb 01 12:09:51 2009] [error] [client 129.142.110.98] File does not exist: /usr/share/web-admin/manual/pim
[Sun Feb 01 12:36:37 2009] [error] [client 129.142.110.98] File does not exist: /home/web/59142
[Fri Feb 06 22:45:21 2009] [error] [client 217.157.195.218] File does not exist: /home/web/storrage
[Fri Feb 06 22:45:34 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Fri Feb 06 22:45:43 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Fri Feb 06 22:45:47 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Fri Feb 06 22:46:03 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Fri Feb 06 22:46:22 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Fri Feb 06 22:46:28 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Fri Feb 06 22:46:38 2009] [error] [client 217.157.195.218] File does not exist: /home/web/home
[Sun Feb 08 23:31:48 2009] [notice] caught SIGTERM, sutting down
bubba:/home/linnex#
Thanks for your help
Dan_bub

PS: I can read posts in english, german and danish - :wink:

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 09 Feb 2009, 09:15

Ah sorry

translation: the bubba config file looks alright
and works on my bubba
do you start apache as root?

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 09 Feb 2009, 09:40

do you start apache as root?
I use Linux (putty), logon as ordinary user; at the user prompt I su to root (excito).

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 10 Feb 2009, 01:23

very strange

could you try
/etc/init.d/apache2 stop
ps -ef|grep apa
if there are any processes of apache running kill them
netstat -an|grep 443
are there any connections/listening on port 443?

if all no, start with /etc/init.d/apache2 start
same error?

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 10 Feb 2009, 03:29

Well, from what I can see, there is no apache2 process running anymore. I read on the net, that there might be another configuration file using "Listen 80" or "Listen 443" and Apache2 therefore is giving up.
Or, as I read in another forum last night, could the "bind"- and "hosts"-configuration be the suspect. I'm going to post some more output which hopefully makes it easier to corner the problem. (By the way, I changed port 21 and 22 to get rid of some portsanner)
Thanks
Dan_bub

Code: Select all

bubba:/home/linnex# /etc/init.d/apache2 stop
Stopping web server (apache2)...[Tue Feb 10 08:35:29 2009] [warn] NameVirtualHost *:443 has no VirtualHosts
[Tue Feb 10 08:35:29 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
httpd (no pid file) not running
bubba:/home/linnex#

Code: Select all

bubba:/home/linnex# ps -ef|grep apa
root      7834  7824  0 08:37 pts/0    00:00:00 grep apa
bubba:/home/linnex#
"root 7834" must be the grep command itself, right?

Code: Select all

bubba:/home/linnex# netstat -nplt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:49152           0.0.0.0:*               LISTEN     5458/mediatomb
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN     6401/imap-login
tcp        0      0 0.0.0.0:3689            0.0.0.0:*               LISTEN     5497/mt-daapd
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     4932/mysqld
tcp        0      0 10.0.0.3:139            0.0.0.0:*               LISTEN     5593/smbd
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN     6401/imap-login
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN     5282/ftd.bin
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN     5247/cupsd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN     2399/master
tcp        0      0 10.0.0.3:445            0.0.0.0:*               LISTEN     5593/smbd
tcp6       0      0 :::2144                 :::*                    LISTEN     30807/proftpd: (acc
tcp6       0      0 :::2244                 :::*                    LISTEN     5175/sshd
tcp6       0      0 :::10000                :::*                    LISTEN     5282/ftd.bin
tcp6       0      0 :::631                  :::*                    LISTEN     5247/cupsd
bubba:/home/linnex#

Code: Select all

bubba:/home/linnex# cat /etc/hosts
127.0.0.1       bubba.localdomain       bubba
127.0.0.1       localhost.localdomain   localhost
192.168.10.1    bubba.localdomain       bubba

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
bubba:/home/linnex#

Code: Select all

bubba:/home/linnex# netstat - ao
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 10.0.0.3:imaps          10.0.0.2:24174          ESTABLISHED
tcp        0      0 10.0.0.3:imaps          10.0.0.2:24176          ESTABLISHED
tcp6       0      0 ::ffff:10.0.0.3:2244    ::ffff:10.0.0.2:29616   ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node Path
unix  17     [ ]         DGRAM                    3327     /dev/log
unix  2      [ ]         DGRAM                    128      @/org/kernel/udev/udevd
unix  2      [ ]         DGRAM                    609290
unix  3      [ ]         STREAM     CONNECTED     609287
unix  3      [ ]         STREAM     CONNECTED     609286
unix  3      [ ]         STREAM     CONNECTED     609206   /var/run/dovecot/login/default
unix  3      [ ]         STREAM     CONNECTED     609205
unix  3      [ ]         STREAM     CONNECTED     609202
unix  3      [ ]         STREAM     CONNECTED     609201
unix  3      [ ]         STREAM     CONNECTED     609187
unix  3      [ ]         STREAM     CONNECTED     609186
unix  3      [ ]         STREAM     CONNECTED     609159
unix  3      [ ]         STREAM     CONNECTED     609158
unix  2      [ ]         DGRAM                    608682
unix  2      [ ]         STREAM     CONNECTED     603205
unix  3      [ ]         STREAM     CONNECTED     601392   /var/run/dovecot/login/default
unix  3      [ ]         STREAM     CONNECTED     601391
unix  3      [ ]         STREAM     CONNECTED     601388
unix  3      [ ]         STREAM     CONNECTED     601387
unix  3      [ ]         STREAM     CONNECTED     598766   /var/run/dovecot/login/default
unix  3      [ ]         STREAM     CONNECTED     598765
unix  3      [ ]         STREAM     CONNECTED     598762
unix  3      [ ]         STREAM     CONNECTED     598761
unix  4      [ ]         STREAM     CONNECTED     592214   /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     592213
unix  2      [ ]         DGRAM                    592211
unix  2      [ ]         DGRAM                    591848
unix  2      [ ]         DGRAM                    591006
unix  3      [ ]         STREAM     CONNECTED     168841
unix  3      [ ]         STREAM     CONNECTED     168840
unix  2      [ ]         DGRAM                    168832
unix  2      [ ]         DGRAM                    21144
unix  2      [ ]         DGRAM                    21100
unix  2      [ ]         DGRAM                    8919
unix  3      [ ]         STREAM     CONNECTED     8908
unix  3      [ ]         STREAM     CONNECTED     8907
unix  3      [ ]         STREAM     CONNECTED     8906
unix  3      [ ]         STREAM     CONNECTED     8905
unix  3      [ ]         STREAM     CONNECTED     8904
unix  3      [ ]         STREAM     CONNECTED     8903
unix  3      [ ]         STREAM     CONNECTED     8902
unix  3      [ ]         STREAM     CONNECTED     8901
unix  3      [ ]         STREAM     CONNECTED     8900
unix  3      [ ]         STREAM     CONNECTED     8899
unix  3      [ ]         STREAM     CONNECTED     8898
unix  3      [ ]         STREAM     CONNECTED     8897
unix  3      [ ]         STREAM     CONNECTED     8896
unix  3      [ ]         STREAM     CONNECTED     8895
unix  3      [ ]         STREAM     CONNECTED     8894
unix  3      [ ]         STREAM     CONNECTED     8893
unix  3      [ ]         STREAM     CONNECTED     8892
unix  3      [ ]         STREAM     CONNECTED     8891
unix  3      [ ]         STREAM     CONNECTED     8890
unix  3      [ ]         STREAM     CONNECTED     8889
unix  3      [ ]         STREAM     CONNECTED     8888
unix  3      [ ]         STREAM     CONNECTED     8887
unix  3      [ ]         STREAM     CONNECTED     8886
unix  3      [ ]         STREAM     CONNECTED     8885
unix  3      [ ]         STREAM     CONNECTED     8884
unix  3      [ ]         STREAM     CONNECTED     8883
unix  3      [ ]         STREAM     CONNECTED     8882
unix  3      [ ]         STREAM     CONNECTED     8881
unix  3      [ ]         STREAM     CONNECTED     8880
unix  3      [ ]         STREAM     CONNECTED     8879
unix  3      [ ]         STREAM     CONNECTED     8878
unix  3      [ ]         STREAM     CONNECTED     8877
unix  3      [ ]         STREAM     CONNECTED     8876
unix  3      [ ]         STREAM     CONNECTED     8875
unix  3      [ ]         STREAM     CONNECTED     8874
unix  3      [ ]         STREAM     CONNECTED     8873
unix  3      [ ]         STREAM     CONNECTED     8872
unix  3      [ ]         STREAM     CONNECTED     8871
unix  3      [ ]         STREAM     CONNECTED     8870
unix  3      [ ]         STREAM     CONNECTED     8869
unix  3      [ ]         STREAM     CONNECTED     8868
unix  3      [ ]         STREAM     CONNECTED     8867
unix  3      [ ]         STREAM     CONNECTED     8866
unix  3      [ ]         STREAM     CONNECTED     8865
unix  3      [ ]         STREAM     CONNECTED     8864
unix  3      [ ]         STREAM     CONNECTED     8863
unix  3      [ ]         STREAM     CONNECTED     8862
unix  3      [ ]         STREAM     CONNECTED     8861
unix  3      [ ]         STREAM     CONNECTED     8860
unix  3      [ ]         STREAM     CONNECTED     8859
unix  3      [ ]         STREAM     CONNECTED     8858
unix  3      [ ]         STREAM     CONNECTED     8857
unix  3      [ ]         STREAM     CONNECTED     8856
unix  3      [ ]         STREAM     CONNECTED     8855
unix  3      [ ]         STREAM     CONNECTED     8854
unix  3      [ ]         STREAM     CONNECTED     8853
unix  3      [ ]         STREAM     CONNECTED     8852
unix  3      [ ]         STREAM     CONNECTED     8851
unix  3      [ ]         STREAM     CONNECTED     8850
unix  3      [ ]         STREAM     CONNECTED     8849
unix  2      [ ]         DGRAM                    8746
unix  2      [ ]         DGRAM                    4237
unix  2      [ ]         DGRAM                    3891
unix  2      [ ]         DGRAM                    3800
unix  3      [ ]         STREAM     CONNECTED     3766     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     3765
unix  3      [ ]         STREAM     CONNECTED     3760
unix  3      [ ]         STREAM     CONNECTED     3759
unix  2      [ ]         DGRAM                    3757
unix  3      [ ]         STREAM     CONNECTED     3715
unix  3      [ ]         STREAM     CONNECTED     3714
unix  2      [ ]         DGRAM                    3342
bubba:/home/linnex#

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 10 Feb 2009, 04:37

it is not that you have strange characters in the bubba file?

cat -v /etc/apache2/sites-enabled/bubba

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 10 Feb 2009, 05:11

I cant't see any strange characters :

Code: Select all

bubba:/etc/apache2# cat -v /etc/apache2/sites-enabled/bubba
Listen 443

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile      /etc/apache2/cacert.pem
        SSLCertificateKeyFile   /etc/apache2/privkey.pem

        ServerAdmin webmaster@localhost

        DocumentRoot /home/web/
        DirectoryIndex index.html index.htm index.cgi index.pl index.php index.xhtml
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/web/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        Alias /icons/ "/usr/share/apache2/icons/"
        <Directory "/usr/share/apache2/icons">
                Options Indexes MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/web/
        DirectoryIndex index.html index.htm index.cgi index.pl index.php index.xhtml
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/web/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        Alias /icons/ "/usr/share/apache2/icons/"
        <Directory "/usr/share/apache2/icons">
                Options Indexes MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
        </Directory>

</VirtualHost>
bubba:/etc/apache2#
I found this in the "Apache troubleshoting" section on:
http://www.gentoo.org/proj/en/apache/d ... oting.xml

I'am getting exactly this error but were could this double "Listen" hide itself?

6. Address already in use: make_sock: could not bind to address 0.0.0.0:443

This error occurs during start-up and is caused by having multiple Listen directives in your configuration that are incompatible. To solve this problem, you should grep your configuration for Listen and fix each occurrence.

Code Listing 6.1: Finding all Listen directives

(Make sure you are in the configuration directory)
# cd /etc/apache2/

(List all listen directives)
# grep Listen httpd.conf vhosts.d/*.conf modules.d/*.conf

What you are looking for conflicts with what Apache is trying to bind to. For example, if there is a Listen 80 in httpd.conf and there is a Listen 10.0.0.15:80 in another file, then Apache will not be able to start. This is because Apache first binds to port 80 on all IP addresses for the machine and then tries to bind to port 80 on IP address 10.0.0.15 and fails because port 80 is already in use.

The recommended configuration is that you have a single Listen 80 (this is in the default httpd.conf) so that you bind to all addresses by default for the standard HTTP port and then for every SSL VirtualHost you run you create a separate absolute Listen directive (such as Listen 10.0.0.15:443).

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 10 Feb 2009, 05:38

you can do a
to find the files with Listen
find /etc/apache2 -type f -exec grep -l Listen {} \;

to find the strings in the files
find /etc/apache2 -type f -exec grep Listen {} \;

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 10 Feb 2009, 06:35

You made my dag, Eek.
You won't believe this. Before changing things, I - of course - make a backup of the original file. But, in this case, it actually shot myself in the foot. Have a look at that:

Code: Select all

bubba:/etc/apache2# find /etc/apache2 -type f -exec grep -l Listen {} \;
/etc/apache2/ports.conf
/etc/apache2/sites-enabled/bubba-orginal
/etc/apache2/sites-available/bubba

Code: Select all

bubba:/etc/apache2# find /etc/apache2 -type f -exec grep Listen {} \;
Listen 80
Listen 443
Listen 443
Apache2 seems to have a look at all files living in the "sites-enabled" directory.
I moved the backup "bubba-original" to my home-directory, restarted apache2 and everything was fine.
I realy envy you guys shooting these "find" and "grep" - commands from the hip. One day I am leaving my "copy & past"- level - that's what I keep promising myself everytime I get in trouble. :)
Well, Eek, thanks for hanging on all the way through.
Many thanks and all the best
Dan_bub

Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek » 10 Feb 2009, 07:45

great!
you're very welcome

In the /etc/apache2/sites-available directory the config files are located.
In the /etc/apache2/sites-enabled directory there are symbolic links to the /etc/apache2/sites-available directory to enable certain config files.

so if you modify stuff, do it in the /etc/apache2/sites-available directory.
and link only the ones you want enabled.

cheers
Eek

dan_bub
Posts: 22
Joined: 23 Jan 2009, 04:08

Post by dan_bub » 10 Feb 2009, 09:01

In the /etc/apache2/sites-available directory the config files are located.
In the /etc/apache2/sites-enabled directory there are symbolic links to the /etc/apache2/sites-available directory to enable certain config files.
Thanks for the tip. I will do that.

Cheers
Dan_bub

Locked