diff --git a/example/nginx.conf b/example/nginx.conf new file mode 100644 index 0000000..6b2e7be --- /dev/null +++ b/example/nginx.conf @@ -0,0 +1,40 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl; + listen [::]:443 ssl; + ssl_certificate /your/certificate/fullchain.pem; + ssl_certificate_key /your/certificate/privkey.pem; + + index index.html index.php index.htm; + + client_max_body_size 500M; + client_body_buffer_size 128k; + + disable_symlinks off; + + + server_name your.server.url; + + location / { + proxy_set_header X-Forwarded-Host $http_cf_connecting_ip; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto http; + proxy_pass http://127.0.0.1:53842; + } + + + + + if ( $scheme = http ) { + return 301 https://$server_name$request_uri; + } + + + location ~ /\.ht { + deny all; + } +} +