NoPaste

ssl

von Lockslay

SNIPPET_TEXT:
  1. root@debianserver:/var/www/html# mkdir -p /etc/apache2/ssl
  2. root@debianserver:/var/www/html# clear
  3. 
  4. root@debianserver:/var/www/html# openssl req -new -x509 -days 3650 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem
  5. Generating a 2048 bit RSA private key
  6. ..+++
  7. ..................................................+++
  8. writing new private key to '/etc/apache2/ssl/apache.pem'
  9. -----
  10. You are about to be asked to enter information that will be incorporated
  11. into your certificate request.
  12. What you are about to enter is what is called a Distinguished Name or a DN.
  13. There are quite a few fields but you can leave some blank
  14. For some fields there will be a default value,
  15. If you enter '.', the field will be left blank.
  16. -----
  17. Country Name (2 letter code) [AU]:DE
  18. State or Province Name (full name) [Some-State]:NRW
  19. Locality Name (eg, city) []:Krefeld
  20. Organization Name (eg, company) [Internet Widgits Pty Ltd]:Lockslay
  21. Organizational Unit Name (eg, section) []:Lockslay          
  22. Common Name (e.g. server FQDN or YOUR name) []:
  23. Email Address []:Lockslay@gmx.at
  24. 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
  25. root@debianserver:/var/www/html# chmod 600 /etc/apache2/ssl/apache.pem
  26. root@debianserver:/var/www/html# openssl x509 -in /etc/apache2/ssl/apache.pem -text
  27.  
  28. root@debianserver:/var/www/html# openssl x509 -noout -in /etc/apache2/ssl/apache.pem -fingerprint -sha1
  29. SHA1 Fingerprint=B3:E4:6A:42:A5:F0:56:04:89:3B:B0:F5:1C:3D:93:EF:BB:28:2D:F5
  30. root@debianserver:/var/www/html# vim /etc/apache2/ports.conf
  31. root@debianserver:/var/www/html# a2enmod ssl
  32. Considering dependency setenvif for ssl:
  33. Module setenvif already enabled
  34. Considering dependency mime for ssl:
  35. Module mime already enabled
  36. Considering dependency socache_shmcb for ssl:
  37. Enabling module socache_shmcb.
  38. Enabling module ssl.
  39. See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
  40. To activate the new configuration, you need to run:
  41.   service apache2 restart
  42. root@debianserver:/var/www/html# service apache2 force-reload
  43. root@debianserver:/var/www/html# vim /etc/apache2/sites-available/ssl
  44. root@debianserver:/var/www/html# vim /etc/apache2/sites-available/ssl
  45. root@debianserver:/var/www/html# a2ensite ssl
  46. ERROR: Site ssl does not exist!
  47. root@debianserver:/var/www/html# vim /etc/apache2/sites-available/ssl
  48. root@debianserver:/var/www/html# cd  /etc/apache2/sites-available
  49. root@debianserver:/etc/apache2/sites-available# ls
  50. 000-default.conf  default-ssl.conf  ssl
  51. root@debianserver:/etc/apache2/sites-available# mv ssl ssl.conf
  52. root@debianserver:/etc/apache2/sites-available# a2ensite ssl
  53. Enabling site ssl.
  54. See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
  55. To activate the new configuration, you need to run:
  56.   service apache2 reload
  57. root@debianserver:/etc/apache2/sites-available# service apache2 force-reload
  58. root@debianserver:/etc/apache2/sites-available# /etc/init.d/apache2 restart
  59. [....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
  60.  failed!
  61. root@debianserver:/etc/apache2/sites-available# /etc/init.d/apache2 start
  62. [....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
  63.  failed!

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN