首页 > 解决方案 > Fathom lite 分析 - 为什么我收到“POST /api/session HTTP/1.1”401 32”?

问题描述

我正在为我的博客使用Fathom Lite - 简单的网站分析,并严格按照指定安装,但 NGINX 除外,因为我更喜欢通过 apache 设置反向代理(此处的所有步骤)。但是我无法登录。我Invalid username or password在浏览器和msg="127.0.0.1 - - [10/May/2021:14:08:55 +0000] \"POST /api/session HTTP/1.1\" 401 32"我的服务器日志中接收。

这里我是如何在 apache2 上配置反向代理的:

<VirtualHost *:80>
        # Replace with your domain
        ServerName fathom.my-site.com
        # Replace with your domain
        Redirect permanent / https://fathom.my-site.com
   
  
   RewriteEngine on
   RewriteCond %{SERVER_NAME} =fathom.my-site.com
   RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
   </VirtualHost>
   <VirtualHost *:443>
       # Replace with your domain
       ServerName fathom.my-site.com
  
       SSLProxyEngine on
       ProxyPass / http://127.0.0.1:9000/
       ProxyPassReverse / http://127.0.0.1:9000/
       ProxyPreserveHost on
       RequestHeader set X-Forwarded-Proto "https"
  
   
  SSLCertificateFile /etc/letsencrypt/live/fathom.my-site.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/fathom.my-site.com/privkey.pem
  Include /etc/letsencrypt/options-ssl-apache.conf
  </VirtualHost>

会发生什么?如果我使用 HTTPS,为什么我会获得未经授权的 http/1.1?我可能缺少什么?它与 HTTP/HTTPS/反向代理有关吗?

标签: apachehttp-headersanalytics

解决方案


推荐阅读