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.

Can nginx be used with SSL?I am using http://nginxcp.com/ for my CPanel server and here are my config file setups

server {
          error_log /var/log/nginx/vhost-error_log warn;
          server_name domina.org www.domina.org domina2.info www.domina2.info;
          access_log /usr/local/apache/domlogs/domina.org-bytes_log bytes_log;
          access_log /usr/local/apache/domlogs/domina.org combined;
          root /home/domina/public_html;
          location / {
          location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
          expires 7d;
          try_files $uri @backend;
          error_page 405 = @backend;
          add_header X-Cache "HIT from Backend";
          include proxy.inc;
          location @backend {
          include proxy.inc;
          location ~ .*\.(php|jsp|cgi|pl|py)?$ {
          include proxy.inc;
          location ~ /\.ht {
          deny all;

how do I get SSL added?

share|improve this question

closed as not a real question by Michael Hampton, Ward, mdpc, Khaled, Antoine Benkemoun Feb 6 '13 at 17:40

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Of course Nginx can handle HTTPS requests !

server {
   listen                   443;
   server_name              secure.mydomain.com;
   ssl                      on;
   ssl_certificate          /home/mydomain/conf/cert/chained_mydomain.crt;
   ssl_certificate_key      /home/mydomain/conf/cert/private_unlocked.pem;
   keepalive_timeout        50;

Here the official documentation about HttpSSL module: http://wiki.nginx.org/HttpSslModule

share|improve this answer

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