Created
September 11, 2017 17:42
-
-
Save jmlrt/1bd97440046a9925037bef7027bdcb1f to your computer and use it in GitHub Desktop.
nginx minimal https reverse proxy configuration
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
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
proxy_pass http://webserver:8080; | |
} | |
} | |
server { | |
listen 443 ssl; | |
server_name localhost; | |
ssl_certificate /etc/nginx/conf.d/selfsigned.crt; | |
ssl_certificate_key /etc/nginx/conf.d/selfsigned.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
location / { | |
proxy_pass http://webserver:8080; | |
} | |
} |
If you are lazy and don't want to create the certs yourself, just apt install ssl-cert
and it creates snakoil certs when installed.
If you are lazy and don't want to create the certs yourself, just
apt install ssl-cert
and it creates snakoil certs when installed.
TIL 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
creating certificate with
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/conf.d/selfsigned.key -out /etc/nginx/conf.d/selfsigned.crt