How to make Apache 2 stop asking for a password for an SSL certificate?

John Scott

I just added an SSL certificate to Apache. The problem is that Apache runs on system startup and after my server turns on, Apache runs but doesn't run. I put in the IP address of my computer and my browser just keeps trying to connect. I see a spinning circle.

Then I get on my server, kill all Apache-related processes, and run sudo service apache2 restart. Because of the sudo I am prompted for my super-user password, but after I put it in, Apache asks for the password for the .key file. I put it in and then Apache works fine. The SSL even works.

So why does Apache not work until I restart it? Is it because it wants me to put in the password every startup? If so, how do I do that on my Xubuntu server? Can I make it so I won't have to put it in every time?

Lekensteyn

It appears that the private key for your SSL certificate is password-protected. To test whether this is really the case, examine the beginning of your keyfile using the command head -3 your.key. This private key is encrypted:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,C251E8A1254B933D763703EE1C364AB7

This file is not encrypted:

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvbeWtO9nQP4cFFuhGrOM/WQ73oTQHU7mzZB9CaA3R2iwjDNz
wwlDtT9tfo0tCC2ib9STfeM6AYrdI3wauzCu7AV4CFGSMP3HLX8DJuk8zzbdQHHv

To remove the password from a RSA private key, use the following command:

umask 077
mv your.key old-with-pass.key
openssl rsa -in old-with-pass.key -out your.key

The umask 077 command is necessary to ensure that the new key is not created with overly relaxed permissions. Alternatively, you can manually change the mode of the file with chmod 400 new.key. Depending on the location of the key, you might have to prefix the openssl, mv and chmod commands with sudo.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to make Apache 2 stop asking for a password for an SSL certificate?

From Dev

How to stop github always asking for username / password?

From Dev

make nautilus stop asking for password when mounting disk

From Dev

How can I make chrome (stop asking to be) the default browser?

From Dev

How to make Sublime Text stop asking me to reload every file

From Dev

How to make Jersey ignore ssl certificate error?

From Dev

Stop Ubuntu asking for password to mount second drive

From Dev

Stop Ubuntu asking for password to mount second drive

From Dev

how to (if possible) create a SSL certificate for only one website on my apache2 server?

From Dev

how to (if possible) create a SSL certificate for only one website on my apache2 server?

From Dev

How to easily create a SSL certificate and configure it in Apache2 in Mac OS X?

From Dev

How do I stop GitX asking me for my SSH key password?

From Dev

Email account expired - how can I get Outlook 2010 to stop asking for a password?

From Dev

Make GoogleAuthUtil stop asking user for offline access

From Dev

How do I use an SSL client certificate with Apache HttpClient?

From Dev

How can I configure multiple <virtualhost> with the same SSL Certificate - Apache

From Dev

How to manually install SSL certificate on Apache without Cpanel access?

From Dev

SSL certificate for a local apache server

From Dev

Apache serves an old SSL certificate

From Dev

SSL Certificate at a specific URL on Apache

From Dev

COMODO SSL Certificate on apache CentOS

From Dev

JAVA : How to make SSL connection with public certificate and private key

From Dev

Acrobat Reader DC keeps asking for file location, how do I make it stop?

From Dev

chef-solo stop asking server password multiple times

From Dev

Windows 10 - won't stop asking for a password no matter the settings

From Dev

Soap service with an ssl certificate with password (PHP)

From Dev

How to set the timeout for sudo asking for password?

From Dev

How to switch a group without asking for a password?

From Dev

How to prevent smbtree from asking for a password?

Related Related

  1. 1

    How to make Apache 2 stop asking for a password for an SSL certificate?

  2. 2

    How to stop github always asking for username / password?

  3. 3

    make nautilus stop asking for password when mounting disk

  4. 4

    How can I make chrome (stop asking to be) the default browser?

  5. 5

    How to make Sublime Text stop asking me to reload every file

  6. 6

    How to make Jersey ignore ssl certificate error?

  7. 7

    Stop Ubuntu asking for password to mount second drive

  8. 8

    Stop Ubuntu asking for password to mount second drive

  9. 9

    how to (if possible) create a SSL certificate for only one website on my apache2 server?

  10. 10

    how to (if possible) create a SSL certificate for only one website on my apache2 server?

  11. 11

    How to easily create a SSL certificate and configure it in Apache2 in Mac OS X?

  12. 12

    How do I stop GitX asking me for my SSH key password?

  13. 13

    Email account expired - how can I get Outlook 2010 to stop asking for a password?

  14. 14

    Make GoogleAuthUtil stop asking user for offline access

  15. 15

    How do I use an SSL client certificate with Apache HttpClient?

  16. 16

    How can I configure multiple <virtualhost> with the same SSL Certificate - Apache

  17. 17

    How to manually install SSL certificate on Apache without Cpanel access?

  18. 18

    SSL certificate for a local apache server

  19. 19

    Apache serves an old SSL certificate

  20. 20

    SSL Certificate at a specific URL on Apache

  21. 21

    COMODO SSL Certificate on apache CentOS

  22. 22

    JAVA : How to make SSL connection with public certificate and private key

  23. 23

    Acrobat Reader DC keeps asking for file location, how do I make it stop?

  24. 24

    chef-solo stop asking server password multiple times

  25. 25

    Windows 10 - won't stop asking for a password no matter the settings

  26. 26

    Soap service with an ssl certificate with password (PHP)

  27. 27

    How to set the timeout for sudo asking for password?

  28. 28

    How to switch a group without asking for a password?

  29. 29

    How to prevent smbtree from asking for a password?

HotTag

Archive