Created
July 11, 2016 15:18
-
-
Save vancouverwill/d648dbc69404d50eeede069603560101 to your computer and use it in GitHub Desktop.
Sample SSL only NGINX config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; | |
server { | |
listen 443 ssl; # only expose port 443 | |
root /usr/services/dummy; | |
# set limits | |
client_max_body_size 20m; | |
client_header_timeout 1200; | |
client_body_timeout 1200; | |
send_timeout 1200; | |
keepalive_timeout 1200; | |
# set certificate settings | |
ssl_certificate dummy.cert; | |
ssl_certificate_key dummy.cert.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
access_log /var/log/nginx/access.log combined; | |
error_log /var/log/nginx/error.log warn; | |
location ~ /* { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass 127.0.0.1:5500; # we are looking at port 5500 so make sure we start the API binary on port 5500 so this works | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment