ssl
von Lockslay- SNIPPET_TEXT:
-
- root@debianserver:/var/www/html# mkdir -p /etc/apache2/ssl
- root@debianserver:/var/www/html# clear
- [3;J
- root@debianserver:/var/www/html# openssl req -new -x509 -days 3650 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem
- Generating a 2048 bit RSA private key
- ..+++
- ..................................................+++
- writing new private key to '/etc/apache2/ssl/apache.pem'
- -----
- You are about to be asked to enter information that will be incorporated
- into your certificate request.
- What you are about to enter is what is called a Distinguished Name or a DN.
- There are quite a few fields but you can leave some blank
- For some fields there will be a default value,
- If you enter '.', the field will be left blank.
- -----
- Country Name (2 letter code) [AU]:DE
- State or Province Name (full name) [Some-State]:NRW
- Locality Name (eg, city) []:Krefeld
- Organization Name (eg, company) [Internet Widgits Pty Ltd]:Lockslay
- Organizational Unit Name (eg, section) []:Lockslay
- Common Name (e.g. server FQDN or YOUR name) []:
- Email Address []:Lockslay@gmx.at
- root@debianserver:/var/www/html# ln -sf /etc/apache2/ssl/apache.pem /etc/apache2/ssl/`/usr/bin/openssl x509 -noout -hash < /etc/apache2/ssl/apache.pem`.0
- root@debianserver:/var/www/html# chmod 600 /etc/apache2/ssl/apache.pem
- root@debianserver:/var/www/html# openssl x509 -in /etc/apache2/ssl/apache.pem -text
- root@debianserver:/var/www/html# openssl x509 -noout -in /etc/apache2/ssl/apache.pem -fingerprint -sha1
- SHA1 Fingerprint=B3:E4:6A:42:A5:F0:56:04:89:3B:B0:F5:1C:3D:93:EF:BB:28:2D:F5
- root@debianserver:/var/www/html# vim /etc/apache2/ports.conf
- root@debianserver:/var/www/html# a2enmod ssl
- Considering dependency setenvif for ssl:
- Module setenvif already enabled
- Considering dependency mime for ssl:
- Module mime already enabled
- Considering dependency socache_shmcb for ssl:
- Enabling module socache_shmcb.
- Enabling module ssl.
- See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
- To activate the new configuration, you need to run:
- service apache2 restart
- root@debianserver:/var/www/html# service apache2 force-reload
- root@debianserver:/var/www/html# vim /etc/apache2/sites-available/ssl
- root@debianserver:/var/www/html# vim /etc/apache2/sites-available/ssl
- root@debianserver:/var/www/html# a2ensite ssl
- ERROR: Site ssl does not exist!
- root@debianserver:/var/www/html# vim /etc/apache2/sites-available/ssl
- root@debianserver:/var/www/html# cd /etc/apache2/sites-available
- root@debianserver:/etc/apache2/sites-available# ls
- 000-default.conf default-ssl.conf ssl
- root@debianserver:/etc/apache2/sites-available# mv ssl ssl.conf
- root@debianserver:/etc/apache2/sites-available# a2ensite ssl
- Enabling site ssl.
- See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
- To activate the new configuration, you need to run:
- service apache2 reload
- root@debianserver:/etc/apache2/sites-available# service apache2 force-reload
- root@debianserver:/etc/apache2/sites-available# /etc/init.d/apache2 restart
- [....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
- failed!
- root@debianserver:/etc/apache2/sites-available# /etc/init.d/apache2 start
- [....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
- failed!
Quellcode
Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN