# virtual host with ssl not working

**URL:** <https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245>\
**Category:** SLES Configure-Administer\
**Created:** [March 11, 2014, 10:45pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245 "2014-03-11T22:45:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [March 11, 2014, 10:45pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/1 "2014-03-11T22:45:51Z")

</div>

SLES 11 SP3. I have a number of virtual hosts running just fine on  
port 80. I need to setup one for port 443. I have the certificate  
and I have configured everything, but when I browse to the page, I get  
a “webpage is not available, err\_connection\_reset” error. I’ve been  
through the apache and ssl logs and I cannot figure out what I am  
missing. I have run a secure site on Netware, so I have even compared  
my apache config on SLES against my apache config on Netware, but  
nothing appears obviously wrong. Any suggestions?

Thanks,  
Ken

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [March 11, 2014, 10:57pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/2 "2014-03-11T22:57:09Z")

</div>

On Tue, 11 Mar 2014 20:45:51 GMT, KeN Etter  
[ketter@no-mx.forums.novell.com](mailto:ketter@no-mx.forums.novell.com) wrote:  
[color=blue]

> SLES 11 SP3. I have a number of virtual hosts running just fine on  
> port 80. I need to setup one for port 443. I have the certificate  
> and I have configured everything, but when I browse to the page, I get  
> a “webpage is not available, err\_connection\_reset” error. I’ve been  
> through the apache and ssl logs and I cannot figure out what I am  
> missing. I have run a secure site on Netware, so I have even compared  
> my apache config on SLES against my apache config on Netware, but  
> nothing appears obviously wrong. Any suggestions?
> 
> Thanks,  
> Ken[/color]

“telnet servername 80” makes a connection  
“telnet servername 443” returns “could not open connection to the  
host, on port 443: connect failed”

So it looks like it just isn’t listening. I’ve turned off the  
firewall to verify, so that isn’t the problem.

Ken

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [March 11, 2014, 11:06pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/3 "2014-03-11T23:06:23Z")

</div>

Figured out part of the problem…commenting out the 2 lines listed  
below in the listen.conf file and then I can access the pages.

#  
\<IfDefine !NOSSL\>  
  
Listen 443  
  
  
#

Which setting am I missing that would cause this?

Thanks,  
Ken

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [March 11, 2014, 11:08pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/4 "2014-03-11T23:08:53Z")

</div>

The easiest way to verify listening is with ‘ss’:

## Code:

## /usr/sbin/ss -planeto | grep :443

If it is not listening, then the Apache config is probably still wrong,  
though not getting errors about it is a little surprising. Have you tried  
the ‘configtest’ option for the ‘apache2’ init script to see if anything  
is amiss there (I assume you’ve restarted Apache httpd since setting  
things up)? Anything in error\_log under /var/log/apache2 or any way to  
get more-verbose output? I think there’s an option to show parsing as it  
happens with the service, but I do not have a box nearby to verify.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [March 12, 2014, 12:34pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/5 "2014-03-12T12:34:26Z")

</div>

On 11/03/2014 21:06, KeN Etter wrote:  
[color=blue]

> Figured out part of the problem…commenting out the 2 lines listed  
> below in the listen.conf file and then I can access the pages.
> 
> #  
> \<IfDefine !NOSSL\>  
>   
> Listen 443  
>   
>   
> #
> 
> Which setting am I missing that would cause this?[/color]

The “correct” way to enable SSL support with Apache on SLES/OES is to  
set the SSL flag in /etc/sysconfig/apache2 by adding SSL to  
APACHE\_SERVER\_FLAGS.

That would then define SSL at Apache startup thus passing the first test  
above.

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [March 12, 2014, 3:45pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/6 "2014-03-12T15:45:27Z")

</div>

On Wed, 12 Mar 2014 10:34:26 GMT, Simon Flood  
[smflood@no-mx.forums.suse.com](mailto:smflood@no-mx.forums.suse.com) wrote:  
[color=blue]

> On 11/03/2014 21:06, KeN Etter wrote:  
> [color=green]
> 
> > Figured out part of the problem…commenting out the 2 lines listed  
> > below in the listen.conf file and then I can access the pages.
> > 
> > #  
> > \<IfDefine !NOSSL\>  
> >   
> > Listen 443  
> >   
> >   
> > #
> > 
> > Which setting am I missing that would cause this?[/color]
> 
> The “correct” way to enable SSL support with Apache on SLES/OES is to  
> set the SSL flag in /etc/sysconfig/apache2 by adding SSL to  
> APACHE\_SERVER\_FLAGS.[/color]

Thanks Simon! I figured it was something like that but I hadn’t found  
it yet.  
[color=blue]

> That would then define SSL at Apache startup thus passing the first test  
> above.
> 
> HTH.[/color]

It did.

Have a great day!  
Ken

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [March 12, 2014, 3:47pm UTC](https://forums.suse.com/t/virtual-host-with-ssl-not-working/25245/7 "2014-03-12T15:47:26Z")

</div>

On Tue, 11 Mar 2014 21:08:53 GMT, ab [ab@no-mx.forums.suse.com](mailto:ab@no-mx.forums.suse.com) wrote:  
[color=blue]

> The easiest way to verify listening is with ‘ss’:
> 
> ## Code:
> 
> /usr/sbin/ss -planeto | grep :443  
> --------------------[/color]

Thanks! Helpful item to know about.  
[color=blue]

> If it is not listening, then the Apache config is probably still wrong,  
> though not getting errors about it is a little surprising. Have you tried  
> the ‘configtest’ option for the ‘apache2’ init script to see if anything  
> is amiss there (I assume you’ve restarted Apache httpd since setting  
> things up)? Anything in error\_log under /var/log/apache2 or any way to  
> get more-verbose output? I think there’s an option to show parsing as it  
> happens with the service, but I do not have a box nearby to verify.[/color]

Simon pointed me to the missing config. So all is well now.

Have a great day!  
Ken
