Nginx 请求随机域名

Nginx 请求随机域名

我在docker容器中使用nginx作为反向代理,没有任何问题。今天我打开nginx日志,发现了这个: Nginx 日志

我不知道为什么,但我的 nginx 会请求世界各地的随机域名。如果这有帮助的话,很多域名都有中文顶级域名。有人能想象为什么会发生这种情况吗?

提前感谢 Jani

我的配置:

events {
  worker_connections  4096;  ## Default: 1024
}

http {

    server {
        listen 80 default_server;
        listen [::]:80 default_server;

        server_name *.XXXXX XXXXX XXXXX;

        return 301 https://$host$request_uri;
    }

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;

        # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
        ssl_certificate /etc/nginx/ssl/XXXXX.crt;
        ssl_certificate_key /etc/nginx/ssl/XXXXX.key;

        ssl_session_timeout 1d;
        ssl_session_cache shared:SSL:50m;
        ssl_session_tickets off;

        # modern configuration. tweak to your needs.
        ssl_protocols TLSv1.2;
        ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
        ssl_prefer_server_ciphers on;

        server_name XXXXX;

        client_max_body_size 100G;

        location / {
            root /data;
            index caseindex.html;
        }

        location /portainer/ {
        proxy_http_version 1.1;
            proxy_set_header Connection "";
            proxy_pass http://XXXXX:9000/;
        }

        location /k8s/ {
            proxy_pass https://XXXXX:32000/;
        }

        location /portainer/api/websocket/ {
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_http_version 1.1;
        proxy_pass http://XXXXX:9000/api/websocket/;
        }

        location /confluence {
            client_max_body_size 100m;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://XXXXX:8090;
        }

        location /synchrony {
            proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://XXXXX:8091/synchrony;
        proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        }

        location /jira {
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
            proxy_pass http://XXXXX:8080/jira;
            client_max_body_size 10M;
        }

    }

    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;

        ssl_certificate /etc/nginx/ssl/XXXXX.crt;
        ssl_certificate_key /etc/nginx/ssl/XXXXX.key;

        ssl_session_timeout 1d;
        ssl_session_cache shared:SSL:50m;
        ssl_session_tickets off;

        # modern configuration. tweak to your needs.
        ssl_protocols TLSv1.2;
        ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
        ssl_prefer_server_ciphers on;

        server_name XXXXX;

        client_max_body_size 100G;

        location /artifactory/ {
          proxy_pass http://XXXXX:5081/artifactory/;
        }

        location /nexus {
          proxy_pass http://nexus:8081/nexus;
          proxy_set_header Host $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 "https";
        }

        location /chat/ {
          proxy_pass http://rocketchat:3000/;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
          proxy_set_header Host $http_host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Forward-Proto http;
          proxy_set_header X-Nginx-Proxy true;
          proxy_redirect off;
        }

    }

}

相关内容