server { listen 80 default; listen 443 ssl; root /var/www/html/; index index.php; server_name localhost 127.0.0.1; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5; auth_basic "Zabbix HTTP Auth"; auth_basic_user_file /etc/nginx/.htpasswd; # Prevent caching of authentication add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; add_header Pragma "no-cache"; add_header Expires "0"; location / { proxy_pass http://localhost:8080/; 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 $scheme; proxy_buffering on; } }