1

I want to restart httpd aws ec2 linux. I write following command in terminal.

  sudo service httpd restart 

But it gives me following error.

Starting httpd: AH00526: Syntax error on line 18 of /etc/httpd/conf.d/ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration
                                                       [FAILED]




Starting httpd: AH00526: Syntax error on line 23 of /etc/httpd/conf.d/ssl.conf:
Invalid command 'SSLSessionCache', perhaps misspelled or defined by a module not included in the server configuration
                                                       [FAILED]

If i comment the line then it will show below error.

Starting httpd: AH00526: Syntax error on line 24 of /etc/httpd/conf.d/ssl.conf:
Invalid command 'SSLSessionCacheTimeout', perhaps misspelled or defined by a module not included in the server configuration
                                                           [FAILED]

I dont think so that each time i have to comment the lines. Currently, i dont need ssl.conf. So i dont want to call it when i am going to restart httpd. how can i do it?

Thanks

Harish Mahajan
  • 3,254
  • 4
  • 27
  • 49

3 Answers3

2

When a module that provides certain Directives is not loaded Apache config check will complain about not "knowing" about them as you see in the errors you get.

You don't have mod_ssl loaded and that's why HTTPD giving you those config errors. Either load mod_ssl or make sure no mod_ssl directives are present (uncomment, delete, do not include ssl.conf, the choice is yours).

Daniel Ferradal
  • 2,727
  • 1
  • 13
  • 19
2

In my Centos 7 system, installing mod_ssl and python2-certbot-apache packages fixed the issue

sudo yum install epel-release

sudo yum install mod_ssl python2-certbot-apache

Manju N
  • 886
  • 9
  • 14
0

Reinstall the httpd and php again. May be your config is broken. I hope it works.

Mrugank Dhimmar
  • 202
  • 3
  • 14