Created
December 21, 2020 19:07
-
-
Save caio-vinicius/12893983b8050c561db75db94ab2d4df to your computer and use it in GitHub Desktop.
Nginx config
This file contains 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
log_format info '$remote_addr - [$time_local] $request $status $body_bytes_sent $http_referer $http_user_agent $gzip_ratio'; | |
server { | |
listen 80; | |
server_name $host; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name $host; | |
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; | |
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; | |
access_log /nginx-access.log info; | |
location / { | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection upgrade; | |
proxy_set_header Accept-Encoding gzip; | |
proxy_pass http://127.0.0.1:4242/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment