Last active
December 11, 2020 10:56
-
-
Save kloudsamurai/97a9080802d154a6f31a to your computer and use it in GitHub Desktop.
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 auto; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
gzip on; | |
# Load modular configuration files from the /etc/nginx/conf.d directory. | |
# See http://nginx.org/en/docs/ngx_core_module.html#include | |
# for more information. | |
include /etc/nginx/conf.d/*.conf; | |
index index.html index.htm; | |
server { | |
listen 443; | |
server_name localhost; | |
root html; | |
ssl on; | |
ssl_certificate /opt/ssl/ssl.crt; | |
ssl_certificate_key /opt/ssl/ssl.key; | |
ssl_protocols TLSv1; | |
ssl_ciphers HIGH: !aNULL:!MD5; | |
ssl_prefer_server_ciphers on; | |
location / { | |
proxy_pass http://127.0.0.1:8080; | |
proxy_http_version 1.1; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-Port $server_port; | |
proxy_set_header X-Real-Scheme $scheme; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment