SSL Apache 사이트를 찾을 수 없습니다

SSL Apache 사이트를 찾을 수 없습니다

웹 서버에 web2py를 설치하려고 했지만 서버 자체에 그래픽 인터페이스가 없기 때문에 SSL을 통해 관리 패널에 액세스해야 했습니다.

저는 Apache 서버 설정에 익숙하지 않아서 이 작업을 수행할 수 없었습니다. 나는 실행했다설정 스크립트SSL 사이트를 설정해야 하는 web2py의 경우 연결을 시도하면 "이 웹 페이지를 사용할 수 없습니다"라는 메시지가 나타납니다. 일반 HTTP로 web2py 프론트 페이지에 연결할 수 있습니다. 나는 또한 약간의 해킹을 시도했지만 apache2 로그에서 오류나 액세스 시도조차 볼 수 없습니다.

나는 달렸다

openssl s_client -state -nbio -connect localhost:443 2>&1 |grep "^SSL"

다음 결과로

SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:error in SSLv2/v3 read server hello A
SSL_connect:SSLv3 read server hello A
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server key exchange A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL_connect:error in SSLv3 read finished A
SSL_connect:error in SSLv3 read finished A
SSL_connect:SSLv3 read finished A
SSL handshake has read 1435 bytes and written 319 bytes
SSL-Session:
SSL3 alert read:warning:close notify
SSL3 alert write:warning:close notify

문제의 사이트는http://www2.olka.fi내 기본 SSL은 이제 다음과 같습니다.

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
    ServerAdmin webmaster@localhost
    WSGIProcessGroup web2py
    WSGIPassAuthorization On
    WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py

    <Directory /home/www-data/web2py>
            AllowOverride None
            Order Allow,Deny
            <Files wsgihandler.py>
                    Allow from all
            </Files>
    </Directory>

    AliasMatch ^/([^/]+)/static/(.*) \
            /home/www-data/web2py/applications/$1/static/$2
    <Directory /home/www-data/web2py/applications/*/static>
            Options -Indexes
            ExpiresActive On
            ExpiresDefault "access plus 1 hour"
            Order Allow,Deny
            Allow from all
    </Directory>

    <Directory /var/www/>
            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 ${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/apache2/ssl/self_signed.cert
    SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key

    <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
    </Directory>

    BrowserMatch "MSIE [2-6]" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
    # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>
</IfModule>

답변1

문제는 실제로 Linux 방화벽이었습니다. 포트 443에 대한 규칙을 추가하면 문제가 해결되었습니다. 따라서 이 질문은 닫거나 삭제할 수 있습니다.

관련 정보