Nginx https
Configuring nginx to use https and use a self-signed certificate (good for testing purposes).
Bash:
openssl req -new -x509 -days 1826 -nodes -out server.crt -keyout server.key
nginx configuration:
server {
server_name your_domain;
listen 443 ssl;
root /path/to/root;
index index.php index.html;
ssl on;
ssl_certificate /path/to/server.crt;
ssl_certificate_key /path/to/server.key;
}
Written by Boštjan Cigan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Nginx
Authors
reiaguilera
279.6K
jamesdullaghan
90.19K
Related Tags
#nginx
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#