0

We are trying to get https working on Apache. It's located at /usr/local/apache2/bin

I can run /usr/local/apache2/bin/apachectl start if https is not used.

However, if I uncomment this line in httpd.conf:

Include conf/extra/httpd-ssl.conf

Then /usr/local/apache2/bin/apachectl start doesn't work. It keeps giving me an error

# /usr/local/apache2/bin/apachectl start
Syntax error on line 56 of /usr/local/apache2/conf/extra/httpd-ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration

The line in httpd-ssl.conf is

SSLPassPhraseDialog  builtin

We also have httpd installed at /usr/sbin/. The tomcat at this location runs fine when I uncomment the above line. Both are running version 2.2.15, just off by like 3 months (which I guess makes the difference).

# /usr/local/apache2/bin/httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Jul 17 2017 13:25:42

# /usr/sbin/httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Mar 22 2017 06:52:55

Does anyone know why this is happening in /usr/local/apache2/bin and not /usr/sbin/ or know how to solve this syntax error? The workaround I'm doing now is to use /usr/sbin but I would like to know the cause of this in case I run into it in the future.

1 Answer 1

2

What version Apache is installed where?

# which -a apache2
/usr/sbin/apache2
# which -a httpd
/usr/sbin/httpd

assuming it's on your $PATH

...how to solve this syntax error?

As noted in the help/man you can (and should) use a different config for each version;

/usr/sbin/httpd -h 2>&1 | grep ServerConfigFile
  -f file            : specify an alternate ServerConfigFile

...SSLPassPhraseDialog...

You can "list available configuration directives" with

/usr/sbin/httpd -L | grep -A 2 SSLPassPhraseDialog
SSLPassPhraseDialog (mod_ssl.c)
    SSL dialog mechanism for the pass phrase query ('builtin', '|/path/to/pipe_program', or 'exec:/path/to/cgi_program')
    Allowed in *.conf only outside <Directory>, <Files>, <Location>, or <If>
2
  • Thanks for your advice. For me, apache2 is not an executable but a directory in /usr/local/apache2/bin/. There is no apache2 in /usr/sbin either, just /usr/sbin/apachectl , which is what I used to start it up =( Regarding the apache2 -L | grep -A SSLPassPhraseDialog, nothing shows up when I run it in both locations =( I still upvoted since you threw some new things at me to try
    – Classified
    Oct 17, 2017 at 2:29
  • @Classified On your system apache2 is called httpd so just substitute (Fedora vs Debian based systems) Oct 17, 2017 at 2:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .