Created
April 22, 2021 20:58
-
-
Save smartass08/013673b81a95649a43206d0a21cd314f to your computer and use it in GitHub Desktop.
default reverse proxy ngnix
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
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/subdomain.doamin.TLD/html; | |
index index.html index.htm index.nginx-debian.html; | |
server_name subdomain.doamin.TLD; | |
return 302 https://$server_name$request_uri; | |
} | |
server { | |
# SSL configuration | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
ssl_certificate /etc/ssl/cert1.pem; | |
ssl_certificate_key /etc/ssl/key1.pem; | |
server_name subdomain.doamin.TLD; | |
location / { | |
proxy_pass http://localhost:9696; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use cloudflare strict policy and generate origin keys