-
All replies
-
Helpful answers
-
Feb 18, 2014 6:03 AM in response to Skakagrallby Skakagrall,OK. I have edited /etc/apache2/extra/httpd-ssl.conf.
Can you explain how to "3) do the sudo openssl........ commands"?
-
Feb 18, 2014 6:05 AM in response to Skakagrallby TopSteve,Skakagrall wrote:
OK. I have edited /etc/apache2/extra/httpd-vhosts.conf and now if I do the
apachectl configtest
command, I get
Syntax OK.
Should I now edit /etc/apache2/extra/httpd-ssl.conf?
Just check that all the lines the artical says should be there are there.
The syntax can be OK even if some of the lines are not.
Like in woodwork "check twice cut once" I sometimes go over and over befor moveing on.
Next run the "sudo openssl.........." commands
-
Feb 18, 2014 6:06 AM in response to TopSteveby TopSteve,OK give me some min's to get the info togever.
-
Feb 18, 2014 6:13 AM in response to Skakagrallby TopSteve,same as n the artical but he forgot to add the "sudo" but so
"openssl genrsa -des3 -passout pass:x -out server.pass.key 2048"shood be
"sudo openssl genrsa -des3 -passout pass:x -out server.pass.key 2048"
and
"sudo openssl rsa -passin pass:x -in server.pass.key -out server.key""sudo rm server.pass.key""sudo openssl req -new -key server.key -out server.csr"
Just highlight the bit's inside the quots "" and cut then past into the terminal one at a time.
-
Feb 18, 2014 6:17 AM in response to TopSteveby TopSteve,now do:
"sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt"
sudo mkdir /etc/apache2/sslsudo cp server.crt /etc/apache2/ssl/ssl.crtsudo cp server.key /etc/apache2/ssl/ssl.key -
Feb 18, 2014 6:19 AM in response to TopSteveby TopSteve,apachectl configtestsudo apachectl startThe hard part done
You now have a webserver running on your local computer.
To check just open Safari or some other broswer and put "http://localhost" and you should get a It works page.
-
-
Feb 18, 2014 6:30 AM in response to Skakagrallby Skakagrall,I get an error message if I try "http://localhost" or https://localhost:8443: Safari can't connect to the server (?)
Any ideas?
-
Feb 18, 2014 6:38 AM in response to Skakagrallby TopSteve,Did you get any messages/errors when you typed "sudo apachectl start"?
Type "tail /var/log/apache2/error_log" and post it here?
-
Feb 18, 2014 6:45 AM in response to TopSteveby Skakagrall,I got:
org.apache.httpd: Already loadedHere is the error log
[Tue Feb 18 22:41:27 2014] [error] Init: Private key not found [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error [Tue Feb 18 22:41:27 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib [Tue Feb 18 22:41:37 2014] [error] Init: Private key not found [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error [Tue Feb 18 22:41:37 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
-
Feb 18, 2014 6:50 AM in response to Skakagrallby TopSteve,OK
We are going to stop the web server.
sudo apachectl stopNow delete the log
sudo rm -rf /var/apache2/*
Now restart the web server
sudo apachectl start
and have a look at the log file again
tail /var/log/apache2/error_log and post it.
-
Feb 18, 2014 7:06 AM in response to TopSteveby Skakagrall,Here it is:
[Tue Feb 18 23:04:25 2014] [error] Init: Private key not found [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error [Tue Feb 18 23:04:25 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib [Tue Feb 18 23:04:35 2014] [error] Init: Private key not found [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error [Tue Feb 18 23:04:35 2014] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib
-
Feb 18, 2014 7:34 AM in response to Skakagrallby TopSteve,OK the problem is with the ssl files. Iver theres an error or in the wrong place or the server can't find them.
1) stop the web service.
2) check the config files
3) delete the ssl files
4) re make the ssl files
5) start the webserver
6) and check again
by now you should know how to do all these steps but as a reminder I will go though them one at a time.
1) sudo apachectl stop
2)a: edit "/var/apache2/httpd.conf"
2)b: edit "/var/apache2/extra/httpd-vhosts.conf"
2)c: edit "/var/apache2/extra/httpd-ssl.conf"
3) "sudo rm -rf /etc/apache2/ssl/*"
4) "sudo openssl genrsa -des3 -passout pass:x -out server.pass.key 2048"
"sudo openssl rsa -passin pass:x -in server.pass.key -out server.key"
"sudo rm server.pass.key"
"sudo openssl req -new -key server.key -out server.csr"
"sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt"
"sudo cp server.crt /etc/apache2/ssl/ssl.crt"
"sudo cp server.key /etc/apache2/ssl/ssl.key"
5) "apachectl configtest"
"sudo apachectl start"
6) goto "http://localhost"
-
Feb 18, 2014 7:50 AM in response to TopSteveby Skakagrall,What do I have to do to /etc/apache2/httpd.conf ?
-
Feb 18, 2014 8:07 AM in response to Skakagrallby Skakagrall,I have to go now. I will check back tomorrow. Thank you for your help.