Debian enabling SSL

Hi All,

I have created a self signed certificate in debian linux using ssl.  I am now trying to get a default-ssl site setup.  Can someone help me out?  I did follow these instructions:  https://wiki.debian.org/Self-Signed_Certificate , but now apache wont start.  

Thanks,

Jackson
Jack_son_Asked:
Who is Participating?
 
Jan SpringerConnect With a Mentor Commented:
What does "apachectl -t" say?
0
 
xtermCommented:
Take a look in /var/log/(apache2 or httpd)/(error.log or ssl_error.log)

It should tell you what is causing the startup to fail.
0
 
Jack_son_Author Commented:
Here is the error:

apache2: Could not reliably determine the server's fully qualified domain name, using 2001:4802:7801:103:9128:887c:ff20:5e9c for ServerName
Syntax OK
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Jan SpringerCommented:
In your httpd.conf, do you have 'ServerName' specified?
0
 
xtermConnect With a Mentor Commented:
Okay, so obviously Apache _is_ starting.  You can verify this by doing:

ps ax | grep httpd

Should look something like this if it's started:

[root@host path]# ps ax | grep httpd
 2116 pts/0    S+     0:00 grep httpd
31082 ?        S      0:45 /usr/sbin/httpd
31234 ?        S      0:46 /usr/sbin/httpd
31235 ?        S      0:48 /usr/sbin/httpd
31416 ?        S      0:45 /usr/sbin/httpd
31417 ?        S      0:46 /usr/sbin/httpd
32293 ?        S      0:45 /usr/sbin/httpd
32342 ?        S      0:47 /usr/sbin/httpd
32344 ?        S      0:48 /usr/sbin/httpd


Judging by the entry in your error log though, it looks like it's trying to bind to your systems IPv6 address.  Are you attempting to connect to the server by name in your web browser, or by IP?

Finally, I get the feeling your Apache might be listening on port 80, but maybe you missed something on the SSL set up and it's not listening on 443.  Please do:

netstat -na | grep :443

If it's SSL-enabled, you'll see something like this:

[root@host ~]# netstat -na | grep :443
tcp        0      0 :::443                         0.0.0.0:*                   LISTEN
tcp        0      0 10.10.0.1:443            0.0.0.0:*                   LISTEN
0
 
Jack_son_Author Commented:
For the first command I see this:

23649 pts/0    S+     0:00 grep httpd

THe second one I don't see anything....


Also right now I am just trying to use it from public ip
0
 
xtermConnect With a Mentor Commented:
Okay, so apache didn't start - there must be more in your log files that you're not pasting here.  Can you try to restart it and look at the error_log again?
0
 
Jan SpringerCommented:
How are you starting the service?  What do the apache error logs say?
0
 
Jack_son_Author Commented:
service apache2 restart

I see the same error as above, I think it may be the name in the config file.
0
 
Jan SpringerConnect With a Mentor Commented:
Have you added a 'ServerName' and reran 'apachectl -t' ?
0
 
Jack_son_Author Commented:
you mean add it in the default-ssl config file?
0
 
xtermCommented:
No, change ServerName in httpd.conf (it's commented out by default, so remove the # sign) and change it to your own fully qualified domain name of your server (aka 'server.domain.com').

Of course, I don't think this is your issue because you said it was working fine until you added the SSL config.  I believe it's something you did in the SSL setup that is breaking it.
0
 
Jack_son_Author Commented:
Thanks; i restored the old ssl config file.  Here is the error I see now:

502 Bad Gateway - Response Error, a bad response was received from another proxy server or the destination origin server.
0
 
Jack_son_Author Commented:
actually fixed the 502 error.  I think the issue is in the ports.conf file.  Right now the first few lines read:

NameVirtualHost *:80
Listen 80

then there is an
<IfModule mod_ssl.c>
which has the Listen 443 within it.

Can someone verify the config for this an the ssl file?
0
 
Jack_son_Author Commented:
THanks for the help everyone, got both http and https working!
0
 
xtermCommented:
Good work!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.