Solved

Debian enabling SSL

Posted on 2013-12-03
16
354 Views
Last Modified: 2013-12-04
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
0
Comment
Question by:Jack_son_
  • 7
  • 5
  • 4
16 Comments
 
LVL 19

Expert Comment

by:xterm
ID: 39692700
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
 
LVL 28

Accepted Solution

by:
Jan Springer earned 250 total points
ID: 39692976
What does "apachectl -t" say?
0
 

Author Comment

by:Jack_son_
ID: 39695913
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 28

Expert Comment

by:Jan Springer
ID: 39695942
In your httpd.conf, do you have 'ServerName' specified?
0
 
LVL 19

Assisted Solution

by:xterm
xterm earned 250 total points
ID: 39695970
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
 

Author Comment

by:Jack_son_
ID: 39695978
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
 
LVL 19

Assisted Solution

by:xterm
xterm earned 250 total points
ID: 39695988
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
 
LVL 28

Expert Comment

by:Jan Springer
ID: 39695998
How are you starting the service?  What do the apache error logs say?
0
 

Author Comment

by:Jack_son_
ID: 39696171
service apache2 restart

I see the same error as above, I think it may be the name in the config file.
0
 
LVL 28

Assisted Solution

by:Jan Springer
Jan Springer earned 250 total points
ID: 39696197
Have you added a 'ServerName' and reran 'apachectl -t' ?
0
 

Author Comment

by:Jack_son_
ID: 39696216
you mean add it in the default-ssl config file?
0
 
LVL 19

Expert Comment

by:xterm
ID: 39696257
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
 

Author Comment

by:Jack_son_
ID: 39696324
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
 

Author Comment

by:Jack_son_
ID: 39696345
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
 

Author Comment

by:Jack_son_
ID: 39696421
THanks for the help everyone, got both http and https working!
0
 
LVL 19

Expert Comment

by:xterm
ID: 39696520
Good work!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wordpress Pagination Function Not working ? 7 28
Insert won't work due to space in column name 5 20
PHP Form Calculate Total Price 10 40
number in printf 13 27
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now