Error: SSL_CTX_set_tlsext_servername_callback failed SSL

Mark Alan varia at
Tue Oct 14 15:02:54 MSD 2008

After uncommenting the *ssl* lines in my 
/etc/nginx/sites-available/mainserver file, I am unable to restart Nginx 
Executing sudo /etc/init.d/nginx restart produces this ERROR:

"Restarting nginx: 2008/10/14 11:25:22 [emerg] 7898#0: 
SSL_CTX_set_tlsext_servername_callback() failed (SSL:)

I have searched with google and at the Nginx site, at the nginx wiki and 
at the nginx email archives, and I could not find any clue about this error.

I am using Nginx 0.6.32 (nginx_0.6.32-3ubuntu1_i386.deb - Ubuntu 8.10) 
in a Ubuntu 8.04 LTS server with libssl0.9.8.
The certificates were created in /etc/nginx/ssl/ with:
openssl req -new -x509 -nodes -out server.crt -keyout server.key

Did anybody had a similar problem?
Do you have any clues on how to overcome this problem?


# start /etc/nginx/sites-available/mainserver
# (...)
server {
listen 443;
server_name phpmyadmin;
access_log  /var/log/nginx/phpmyadmin.access.log;
error_log  /var/log/nginx/phpmyadmin.error.log;

ssl on;
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/cert.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;

	location /phpmyadmin {
		root	/var/www/nginx-default;
		index	index.php;

	location ~ \.php$ {
		include /etc/nginx/fastcgi_params;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME 
		#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}# end /etc/nginx/sites-available/mainserver

More information about the nginx mailing list