Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm adding an SSL domain to a host. When I try to restart Nginx, it protests:

Restarting nginx: [emerg]: the "ssl" parameter requires ngx_http_ssl_module in /etc/nginx/sites-enabled/my_site_conf:16

This is frustrating because I actually rebuilt Nginx and Passenger specifically in order to make ngx_http_ssl_module available; it wasn't in the running instance, so I took the opportunity to build with Nginx 0.8.53 and Passenger 3.0.1.

The relevant configuration block is

server {
        listen  0.0.0.0:443 default ssl;
        server_name  our-site.com;

        ssl_certificate  /etc/nginx/ssl/our-site.crt;
        ssl_certificate_key  /etc/nginx/ssl/our-site.key;

        ssl_session_timeout  5m;

        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;

...etc. etc. (obviously I've obscured the host name, don't need this question coming up in searches for that domain.)

  • How can I be sure the running Nginx instance has the SSL module active?
  • Am I missing something obvious here?
share|improve this question
2  
Run nginx -V through SSH to verify it was built with SSL support. Also make sure it's been restarted and doesn't have multiple processes running. –  Martin Fjordvald Dec 14 '10 at 3:10
    
Martin, your comment was the closest to the real solution; could you provide it as an answer? –  pjmorse Dec 16 '10 at 15:38

2 Answers 2

You are missing the SSL on directive.

http://wiki.nginx.org/HttpSslModule

share|improve this answer
1  
it already enabled in "listen" directive –  ghloogh Dec 14 '10 at 19:25
1  
As noted in the documentation, "Since Nginx version 0.7.14 the preferred way of enabling SSL is by using the ssl parameter of the listen directive" –  pjmorse Dec 15 '10 at 12:47
up vote 0 down vote accepted

Looks like the real problem was that my init script (in /etc/init.d/nginx) was still calling the old version of Nginx, the one without the SSL module, because of a $PATH issue. Fixing some symlinks and deleting the old version fixed the problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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