server { listen 80; server_name yoursitename.com; server_tokens off; location /.well-known/acme-challenge/ { root /var/www/certbot; } location / { #auth_basic "Administrator's Area"; #auth_basic_user_file /basic_auth/.htpasswd; proxy_pass http://bukuserver:5001; 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-Remote-Port $remote_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; } }