代码之家  ›  专栏  ›  技术社区  ›  Alan P.

在本地apache安装程序上获取net::ERR_EMPTY_响应

  •  0
  • Alan P.  · 技术社区  · 6 年前

    This page isn’t working
    samplesite.com didn’t send any data.
    ERR_EMPTY_RESPONSE
    

    请求头包括:

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate, br
    Accept-Language: en-US,en;q=0.9
    Connection: keep-alive
    Cookie: PHPSESSID=xxx; _ga=GAxxx; _gid=GAxxx; __stripe_mid=xxx; __stripe_sid=xxx
    Host: samplesite.com
    Sec-Fetch-Mode: navigate
    Sec-Fetch-Site: none
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
    

    [Mon Jan 20 22:10:18.133644 2020] [core:notice] [pid 4702] AH00052: child pid 6191 exit signal Segmentation fault (11)
    [Mon Jan 20 22:14:02.343396 2020] [core:notice] [pid 4702] AH00052: child pid 6241 exit signal Segmentation fault (11)
    [Mon Jan 20 22:14:02.343886 2020] [core:notice] [pid 4702] AH00052: child pid 6240 exit signal Segmentation fault (11)
    [Mon Jan 20 22:14:07.349923 2020] [core:notice] [pid 4702] AH00052: child pid 6212 exit signal Segmentation fault (11)
    

    尝试获取流程的详细信息不会返回任何结果:

    alan:~$ ps -p 6212
    PID TTY           TIME CMD
    

    为了解决这个问题,我尝试了:

    • 重新启动apache
    • 在匿名模式下发出请求

    我刚刚更新到Catalina,但不认为这是相关的,因为我相信我以前有过这个错误,它自行消失了。

    有什么建议吗?非常感谢。

    0 回复  |  直到 6 年前
        1
  •  3
  •   Alan P.    6 年前

    阅读Firefox中的错误提供了更多的线索。Firefox的错误是:

    Secure Connection Failed: The page you are trying to view cannot be shown because the authenticity of the received data could not be verified
    

    RewriteEngine On
    
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} mysite.com$
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    

        2
  •  0
  •   eleytheria    6 年前

    请尝试一下:

    RewriteCond %{HTTPS} !on
    RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ ([^\ ]+)
    RewriteRule ^ https://%{HTTP_HOST}%2 [L,R=301]
    

    你仍然希望打开https重定向,除了显而易见的,如果你没有完全的https支持,你的网站排名将受到影响。

    推荐文章