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.


What version Apache is installed where?

# which -a apache2
# which -a 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


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>
| improve this answer | |
  • 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 '17 at 2:29
  • @Classified On your system apache2 is called httpd so just substitute (Fedora vs Debian based systems) – user1133275 Oct 17 '17 at 2:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.