User Tools

Site Tools


nginx_ssl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nginx_ssl [2017/11/27 10:27] luke7858nginx_ssl [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 3: Line 3:
 | ssl_certificate         | Certificate file + Intermidiate bundle  path |     | ssl_certificate         | Certificate file + Intermidiate bundle  path |    
 | ssl_certificate_key     | Key file path                                |    | ssl_certificate_key     | Key file path                                |   
 +ssl_certificate = .crt + .ca \\
 ssl_certificate = 'cat Intermediate.txt >> your_domain_com.bundle' ssl_certificate = 'cat Intermediate.txt >> your_domain_com.bundle'
 ------------ ------------
Line 8: Line 9:
 To configure and redirect nginx properly and cleanly you need 3 nginx server blocks. To configure and redirect nginx properly and cleanly you need 3 nginx server blocks.
 \\ \\
-The blocks below show a site that is redirected to non-www domain and forcing https+The blocks below show a site that is redirected to https://non-www.domain
 \\ \\
 A quick overview of these nginx blocks can be found below: A quick overview of these nginx blocks can be found below:
Line 14: Line 15:
 server 80  -> Used to redirect server 80  -> Used to redirect
 Domains          : ALL domains Domains          : ALL domains
-DocRoot specified: NO +DocRoot specified: NO (: YES if site is combo of http and https) 
-Redirect         : https://domain # note non-www+Redirect         : https://domain # note non-www (: NO if site is combo of http and https)
  
 server 443 -> Used to redirect server 443 -> Used to redirect
Line 31: Line 32:
 \\ \\
 \\ \\
-You will need two server blocks for this:+If the customers application is taking care of the redirects then we can use the following example. \\ 
 +The example below shows configuration with 2 nginx files
  
 <sxh bash> <sxh bash>
Line 46: Line 48:
  
     access_log /var/log/nginx/example.co.uk.access.log;     access_log /var/log/nginx/example.co.uk.access.log;
-    error_log /var/log/nginx/example.co.uk.access.log;+    error_log /var/log/nginx/example.co.uk.error.log;
  
 +    location / {
 +        index index.html index.htm index.php;
 +        try_files $uri $uri/ =404;
 +    }
  
     ssl on;     ssl on;
nginx_ssl.1511778438.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki