Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: "corrupted content" error, httpd can't access SSL |
|
Author |
|
bennypr0fane
Joined: 28 Sep 2014 Posts: 4 Location: Austria
|
Posted: Sun 28 Sep '14 20:31 Post subject: "corrupted content" error, httpd can't access SSL |
|
|
Hi, I can't reach my website, I get a "corrupted content" error message in the browser.
Looking into apache (version 2.4.7), I get
Code: | ~$ apachectl -S
AH00526: Syntax error on line 22 of /etc/apache2/sites-enabled/000-default.conf:
SSLCertificateKeyFile: file '/etc/ssl/private/owncloud.key' does not exist or is empty
Action '-S' failed.
|
However, I double checked that the file is in the appropriate location and does contain the key, so maybe apache has no permission. afaik, it doesn't run as root all the time - or only for a short time?
permissions for the key file are as follows:
Code: | ~$ sudo ls -l /etc/ssl/private/owncloud.key
-rw-r--r-- 1 root ben 1704 Sep 28 04:01 /etc/ssl/private/owncloud.key |
, where ben is my normal user.
It was suggested to me on the httpd IRC channel that maybe apparmor was doing something wrong, but I don't know how to investigate that.
To be clear, this is the first time I am setting up a server, I am all self-taught. Reading suggestions for a good start are appreciated, but of course a how-to or specific section of a manual would be more helpful than a generic exhortation to RTFM
Any hints? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 02 Oct '14 11:09 Post subject: |
|
|
Did you try to download the key again? |
|
Back to top |
|
bennypr0fane
Joined: 28 Sep 2014 Posts: 4 Location: Austria
|
Posted: Fri 03 Oct '14 14:08 Post subject: |
|
|
James Blond wrote: | Did you try to download the key again? |
I use a self-signed certificate, so I generated the key on my own computer. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 06 Oct '14 11:55 Post subject: |
|
|
How did you encode your key? Can you please post the command line? |
|
Back to top |
|
bennypr0fane
Joined: 28 Sep 2014 Posts: 4 Location: Austria
|
Posted: Tue 07 Oct '14 14:57 Post subject: |
|
|
Which command exactly do you mean? the one I created the key with? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 07 Oct '14 15:34 Post subject: |
|
|
Yepp, how did you create your key |
|
Back to top |
|
bennypr0fane
Joined: 28 Sep 2014 Posts: 4 Location: Austria
|
Posted: Wed 08 Oct '14 1:27 Post subject: |
|
|
James Blond wrote: | Yepp, how did you create your key |
Like so:
Code: | openssl genrsa -out /etc/ssl/private/apache.key 2048 |
and
Code: | openssl req -new -x509 -key /etc/ssl/private/apache.key -nodes -days 365 -sha256 -out /etc/ssl/certs/apache.crt |
I got that from here. |
|
Back to top |
|
|
|
|
|
|