apache - 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/反向代理有关吗?
解决方案
推荐阅读
- scala - akka.event.Logging$LoggerInitializationException: Logger log1-Slf4jLogger 没有响应 LoggerInitialized,而是发送 [TIMEOUT]]]
- java - 多线程情况产生 UnknownEntityTypeException: Unable to locate persister
- c++ - 字符串终止符的 C++ 数组
- python - 为什么我不能将我的可执行文件添加到 Windows 寄存器?
- java - 如何在 while 循环中使用字符串数组和扫描仪?
- c# - 将 Unity navmesh 多个代理移动到单点并停止相互推动
- flutter - Flutter:显示带有文本和冻结 UI 的简单 ProgressBar
- sql - 如何将从函数返回的用户定义表类型作为参数传递给另一个内联函数(没有'DECLARE')?
- python - 如何在 Python 中访问聚合函数值
- python - 为什么 xticks 没有出现在我的 Matplotlib 图上?