ssl w apache czyli strony https

sudo a2enmod auth_digest  # włączamy autoryzację przez digest ( nie wymagane )
sudo a2enmod ssl # aktywujemy mod ssl
 

Geerujemy certyfikaty

sudo openssl genrsa -out /etc/apache2/apache.key 1024 
sudo openssl req -new -x509 -days 3650 -key /etc/apache2/apache.key -out /etc/apache2/apache.crt

Edytujemy stronę

sudo vi /etc/apache2/sites-available/default-ssl

<VirtualHost *:443>

        ServerAdmin webmaster@localhost

        DocumentRoot /bn/repozytoria
        SSLEngine On
        SSLOptions +StrictRequire
        SSLCertificateFile /etc/apache2/apache.crt
        SSLCertificateKeyFile /etc/apache2/apache.key

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /bn/repozytoria/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                   AuthType Digest
        AuthName "SMS 2.0" 
        AuthDigestDomain  https://dev.blue-note.pl:20443/
        AuthDigestProvider file
        AuthUserFile /etc/apache2/haselka
        Require valid-user
        </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/SSLerror.log

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

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

    Alias /doc/ "/usr/share/doc/" 
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

#    <Location /zdrowik/>
#       AuthType Digest
#       AuthName "zdrowik" 
#       AuthDigestDomain /zdrowik/ https://spls.ath.cx/zdrowik/

#       AuthDigestProvider file
#       AuthUserFile /etc/apache2/hasla
#       Require valid-user
#    </Location>

</VirtualHost>
uslugi/https.txt · ostatnio zmienione: 2012/12/16 21:22 przez gcze
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki lantan - serwery linux windows Recent changes RSS feed Valid XHTML 1.0