Added example nginx configuration

This commit is contained in:
Marc Ole Bulling
2021-03-13 12:05:49 +01:00
parent 81303252cf
commit b44490aaeb

40
example/nginx.conf Normal file
View File

@@ -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;
}
}