Apache überwacht Port 443 nicht

7

Ich habe ein SSL gekauft und versuche, es in einem Browser einzustellen. Der Port wird im Router an den Server weitergeleitet, und ich glaube, dass das SSL-Zertifikat korrekt installiert ist (der Apache startet in Ordnung).

Ich habe den Port in der IPtables-Firewall geöffnet, aber wenn ich den abgehörten Port aufliste, sehe ich nichts, was Port 443 abhört.

Ich habe meine Konfiguration durchgesehen (Standard-Debian 7 mit LAMP-Server) und habe Folgendes in meiner Datei ports.conf:

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80


<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
     NameVirtualHost *:443
     Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    NameVirtualHost *:443
    Listen 443
</IfModule>

Und in den Sites-fähigen habe ich eine Datei namens default-ssl, die enthält (es ist ziemlich lang, ich füge nur die Hostdaten hinzu, nicht die gesamten SSL-Dateioptionen, es sei denn, jemand kann denken, dass es helfen könnte)

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
#               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 ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

        #   SSL Engine Switch:
        #   Enable/Disable SSL for this virtual host.
        SSLEngine on


    #   A self-signed (snakeoil) certificate can be created by installing
    #   the ssl-cert package. See
    #   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
    #   If both key and certificate are stored in the same file, only the
    #   SSLCertificateFile directive is needed.
    SSLCertificateFile    /etc/ssl/dev.webmark.co.il/dev_webmark_co_il.pem
    SSLCertificateKeyFile /etc/ssl/dev.webmark.co.il/dev.webmark.co.il.key

    #   Server Certificate Chain:
    #   Point SSLCertificateChainFile at a file containing the
    #   concatenation of PEM encoded CA certificates which form the
    #   certificate chain for the server certificate. Alternatively
    #   the referenced file can be the same as SSLCertificateFile
    #   when the CA certificates are directly appended to the server
    #   certificate for convinience.
    #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt

    #   Certificate Authority (CA):
    #   Set the CA certificate verification path where to find CA
    #   certificates for client authentication or alternatively one
    #   huge file containing all of them (file must be PEM encoded)
    #   Note: Inside SSLCACertificatePath you need hash symlinks
    #         to point to the certificate files. Use the provided

Ich entschuldige mich für den sehr langen Beitrag und dachte nur, dass dies relevante Informationen sind.

Ich denke, die Datei ports.conf aktiviert den Listener auf 443, aber ich weiß nicht, warum dies nicht der Fall ist.

Wenn ich die abhörenden Ports aufliste:

netstat -a | egrep 'Proto|LISTEN'

Ich bekomme

Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 10.0.0.10:mysql         *:*                     LISTEN
tcp        0      0 *:35563                 *:*                     LISTEN
tcp        0      0 *:sunrpc                *:*                     LISTEN
tcp        0      0 localhost:61619         *:*                     LISTEN
tcp        0      0 *:61620                 *:*                     LISTEN
tcp        0      0 *:ftp                   *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 10.0.0.10:8888          *:*                     LISTEN
tcp        0      0 localhost:smtp          *:*                     LISTEN
tcp        0      0 *:27017                 *:*                     LISTEN
tcp6       0      0 [::]:sunrpc             [::]:*                  LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 localhost:smtp          [::]:*                  LISTEN
tcp6       0      0 [::]:https              [::]:*                  LISTEN
tcp6       0      0 [::]:55644              [::]:*                  LISTEN
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     7400     /tmp/mongodb-27017.so                                                                                        ck
unix  2      [ ACC ]     STREAM     LISTENING     7444     /var/run/dbus/system_                                                                                        bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     7215     /var/run/rpcbind.sock
unix  2      [ ACC ]     SEQPACKET  LISTENING     3434     /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     7351     /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     7624     /var/run/mysqld/mysql                                                                                        

Ich bin mir ziemlich sicher, dass die Bedingung wahr ist. Ich hoffe, ich habe alle relevanten Informationen gegeben und nicht zu viel davon. Vielen Dank für Ihre Zeit beim Lesen. Yan

Bearbeiten , um sicherzustellen, dass mod_ssl ausgeführt wird - ich habe verwendet

apache2ctl -M

Was ergab mit:

Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 headers_module (shared)
 mime_module (shared)
 ssl_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)
Syntax OK

/bearbeiten

Yanipan
quelle
Nun ... für mich hört Apache aufmerksam zu [::]:https.
John WH Smith

Antworten:

5

Port 443 ist HTTPS. Aus Ihrer netstatAusgabe:

tcp6       0      0 [::]:https              [::]:*                  LISTEN

Es ist klar, dass ein Prozess Port 443 überwacht. Um zu bestätigen, ob es sich bei dem oben genannten Prozess um einen Apache-Prozess (httpd) handelt, ist es wichtig, den Befehl als root auszuführen. Verwenden Sie ssstattdessen wie netstatveraltet:

# ss -tlnp
Fragenüberlauf
quelle
Sie scheinen Recht zu haben - ich muss den gesamten Ablauf durchgehen, um festzustellen, ob der Port tatsächlich an den Server weitergeleitet und in IP-Tabellen geöffnet wird. Vielen Dank.
Yanipan
11

Hast du aktiviert mod_ssl? Da Sie Debian ausführen, können Sie dies folgendermaßen tun (als Root oder über Sudo ausführen):

a2enmod ssl
Steven Montag
quelle
Danke Steven Monday, wenn ich "apache2ctl -M" benutze, sehe ich es in der Liste. Ich werde die ursprüngliche Frage bearbeiten und die vollständige Eingabe hinzufügen, die ich erhalte.
Yanipan