apache not using https

Seth Simmons
Seth Simmons used Ask the Experts™
on
just built a vm running fedora 30.  downloaded and compiled apache 2.4.41 but only partially working.  i have ssl configured but https doesn't work.  the log file shows mod_ssl/openssl present, initializing servers for ssl, configuring tls extension handling, shows the certificate and private key, conf file has it listening on 443 but using netstat only shows http.  no errors int he log, selinux is disabled.  can't figure out why this piece isn't working
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017

Commented:
Please post the config.

Did you generate/create a certificate?
/etc/apache2 or /etc/httpd/ conf.d/SSL.conf  httpd.conf

What guide did you follow to enable HTTPS://?
David FavorFractional CTO
Distinguished Expert 2018

Commented:
1) just built a vm running fedora 30 downloaded and compiled apache 2.4.41 but only partially working.

Correct way to install Apache (skipping LXD commands).

Note: No point in debugging your setup, until you install pre-built Fedora packages... because... trying to debug a build from source setup, means debugging your entire build process.

Note: If you require your build process debugged, this will take several hours, handled by an expensive person with Linux + Apache build... Savant level skill.

net16 # lxc launch images:fedora/30 fedora-30
Creating fedora-30
Starting fedora-30
                      
net16 # lxc exec fedora-30 bash
[root@fedora-30 ~]# dnf group install "Web Server"

[root@fedora-30 ~]# apachectl -V | head
Server version: Apache/2.4.41 (Fedora)
Server built:   Aug 15 2019 22:06:15
Server's Module Magic Number: 20120211:88
Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
Compiled using: APR 1.6.5, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)

Open in new window


Building Apache from source will almost always guarantee failures.

Also hacks, unless you're going to be checking the Apache site every day + rebuilding from source each time patches release.

2) i have ssl configured but https doesn't work.  the log file shows mod_ssl/openssl present, initializing servers for ssl, configuring tls extension handling, shows the certificate and private key, conf file has it listening on 443 but using netstat only shows http.  no errors int he log, selinux is disabled.  can't figure out why this piece isn't working.

As arnold suggested, post contents of following (as text, not images)...

a) /etc/httpd/conf/httpd.conf

b) All your virtual hosts files (best to only have one conf file for each host), which might be in /etc/httpd/conf.d or some other directories.

c) /var/log/httpd/access_log

d) /var/log/httpd/error_log

e) /var/log/httpd/ssl_error_log

f) If you used some HTTPS setup guide, post a link to guide you used.
Seth SimmonsSr. Systems Administrator

Author

Commented:
Did you generate/create a certificate?

i have a wildcard cert that has been working fine; as i said, it appears in the log along with the private key

Correct way to install Apache...

nothing wrong with compiling code; have done a number of apache services over the years from source code

If you used some HTTPS setup guide, post a link to guide you used.

i've always used their own documentation

./configure --enable-so --prefix=/usr/local/apache --with-ssl

Open in new window


http://httpd.apache.org/docs/2.4/install.html#overview
Sr. Systems Administrator
Commented:
figured it out anyway...forgot to remove the remark (#) from the conf file to load extras/httpd-ssl.conf
once i did that, restarted and now shows it listening over https
Distinguished Expert 2017

Commented:
Is it not what I asked in my comment?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial