ubuntu_14.04_mit_apache_und_ssl
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| ubuntu_14.04_mit_apache_und_ssl [2015-04-02 11:56:04] – [Vorbereitungen] manfred | ubuntu_14.04_mit_apache_und_ssl [2024-04-05 14:40:07] (aktuell) – [HTTPS mit Apache auf Ubuntu - Kurzfassung] manfred | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Ubuntu 14.04 mit Apache und SSL ====== | ||
| + | |||
| + | ===== HTTPS mit Apache auf Ubuntu - Kurzfassung ===== | ||
| + | |||
| + | * [[:: | ||
| + | |||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - [[http:// | ||
| + | - '' | ||
| + | - '' | ||
| + | - [[http:// | ||
| + | - '' | ||
| + | - Der SSL-Schlüssel mit selbst signiertem Zertifikat generieren. | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | |||
| + | |||
| + | ===== komplette Konfiguration ===== | ||
| + | |||
| + | |||
| + | ==== Vorbereitungen ==== | ||
| + | |||
| + | > locale-gen de_DE.UTF-8 | ||
| + | > dpkg-reconfigure locales | ||
| + | |||
| + | > aptitude install apache2 | ||
| + | > a2dismod cache_disk | ||
| + | > a2enmod cache | ||
| + | > a2enmod socache_memcache | ||
| + | > a2enmod rewrite | ||
| + | > a2enmod ssl | ||
| + | |||
| + | > mkdir -p / | ||
| + | > openssl req -rand / | ||
| + | > chmod 600 / | ||
| + | > ln -sf / | ||
| + | |||
| + | CRT ansehen: | ||
| + | > openssl x509 -noout -text -in / | ||
| + | |||
| + | > vi / | ||
| + | < | ||
| + | SSLCompression off | ||
| + | |||
| + | ... | ||
| + | # | ||
| + | SSLCipherSuite TLSv1.2 | ||
| + | ... | ||
| + | SSLHonorCipherOrder | ||
| + | ... | ||
| + | # | ||
| + | SSLProtocol -ALL +TLSv1.2 | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | > rm / | ||
| + | |||
| + | > vi / | ||
| + | |||
| + | mit [[http:// | ||
| + | > vi / | ||
| + | < | ||
| + | HostnameLookups Off | ||
| + | UseCanonicalName Off | ||
| + | ServerSignature Off | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # https:// | ||
| + | # | ||
| + | |||
| + | RewriteEngine On | ||
| + | # This will enable the Rewrite capabilities | ||
| + | |||
| + | RewriteCond %{HTTPS} !=on | ||
| + | # This checks to make sure the connection is not already HTTPS | ||
| + | |||
| + | RewriteRule ^/?(.*) https:// | ||
| + | # This rule will redirect users from their original location, to the same location but using HTTPS. | ||
| + | # i.e. http:// | ||
| + | # The leading slash is made optional so that this will work either in httpd.conf | ||
| + | # or .htaccess context | ||
| + | |||
| + | # | ||
| + | |||
| + | < | ||
| + | Options FollowSymlinks | ||
| + | # | ||
| + | AllowOverride All | ||
| + | Require all granted | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | > cp / | ||
| + | > vi / | ||
| + | < | ||
| + | ... | ||
| + | # | ||
| + | # | ||
| + | SSLCertificateFile | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | > service apache2 restart | ||
