Версия - Воспроизводится, начиная с версии curl-8.3.0-alt1 Шаги воспроизведения apt-get install -y curl apache2-base apache2-cgi-bin apache2-cgi-bin-printenv apache2-cgi-bin-test-cgi apache2-mod_ssl a2enmod cgi a2ensite default a2ensite default_https a2enmod ssl a2enport https cat > /etc/httpd2/conf/sites-enabled/000-default_https.conf <<EOF <IfModule ssl_module> <VirtualHost _default_:443> DocumentRoot "/var/www/html" ServerName www.example.com:443 ServerAdmin webmaster@example.com ErrorLog "/var/log/httpd2/error_log" TransferLog "/var/log/httpd2/access_log" SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLCertificateFile "/var/lib/ssl/certs/httpd2.cert" SSLCertificateKeyFile "/var/lib/ssl/private/httpd2.key" <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/var/www/cgi-bin"> SSLOptions +StdEnvVars </Directory> <IfModule setenvif_module> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </IfModule> <IfModule log_config_module> CustomLog "/var/log/httpd2/ssl_request_log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" </IfModule> </VirtualHost> </IfModule> EOF systemctl restart httpd2 chmod 755 /var/www/cgi-bin/printenv chmod 755 /var/www/cgi-bin/test-cgi (echo -e '#!/bin/sh\nhttp://localhost/cgi-bin/test-cgi'; cat /var/www/cgi-bin/test-cgi) | sponge /var/www/cgi-bin/test-cgi curl -skv https://localhost/cgi-bin/printenv 2>/dev/null | grep REMOTE_ADDR Ожидаемый результат: REMOTE_ADDR="127.0.0.1" Фактический результат: REMOTE_ADDR="::1" Похожие ошибки: - https://github.com/curl/curl/pull/12136 - asyn-thread: don’t use PF_INET6 for getaddrinfo on Windows Не воспроизводится, версии: - curl-8.1.0-alt2 - libcurl-8.1.0-alt2
не вижу ошибки - если у вас настроено ipv6 и имя резолвится, надо пробовать ipv6 а затем ipv4: $ curl -skv https://localhost/ * Trying [::1]:443... * connect to ::1 port 443 failed: В соединении отказано * Trying 127.0.0.1:443... * connect to 127.0.0.1 port 443 failed: В соединении отказано * Failed to connect to localhost port 443 after 0 ms: Couldn't connect to server * Closing connection