Apache Auth for QuestDB

发布于 2025-01-23 02:39:00 字数 1202 浏览 2 评论 0原文

我想配置一个没有身份验证系统的Ap​​ache auth代理,以访问QUESTDB。我第一次尝试使用VM。

我做了一个非常简单的配置:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    <Proxy *>
            Order deny,allow
            Allow from all
            AuthType Basic
            Authname "Password Required"
            AuthUserFile /etc/apache2/.htpasswd
            Require valid-user
    </Proxy>
    ProxyPass / http://127.0.0.1:9000/
    ProxyPassReverse / http://127.0.0.1:9000/

    ProxyRequests Off
</VirtualHost>

我用绑定adress配置了QuestDB http://127.0.0.1.1:9000

当我访问http:// myipadress并给我的apache Authentified用户时,我有:

  • 糟糕的请求
  • refresh
  • 没有CSS
  • refresh
  • 坏请求
  • 刷新
  • QuestDB打开了
  • 刷新

,并永远这样循环。

有什么想法吗? 当我刚设置proxypass / proxypassreverses线时,我得到了相同的现象。
我启用了我的Apache Server Mods:Proxy_http,Proxy,Reprite和Cache以及已启用的默认设备。

I want to configure an apache Auth proxy for access to QuestDB that does not have Authentication system. I try it to VM in a first time.

I made a very simple configuration:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    <Proxy *>
            Order deny,allow
            Allow from all
            AuthType Basic
            Authname "Password Required"
            AuthUserFile /etc/apache2/.htpasswd
            Require valid-user
    </Proxy>
    ProxyPass / http://127.0.0.1:9000/
    ProxyPassReverse / http://127.0.0.1:9000/

    ProxyRequests Off
</VirtualHost>

I configured my QuestDB with a bind adress http://127.0.0.1:9000.

When I go to http://myipadress and give my Apache authentified user, I have :

  • Bad request
  • refresh
  • Content without CSS
  • refresh
  • Bad request
  • refresh
  • QuestDB opened
  • refresh

and looping like this forever.

Any idea ?
When I just set the ProxyPass / ProxyPassReverses lines, I got the same phenomenom.
I have enabled my Apache server mods : proxy_http, proxy, rewrite and cache and the default ones that are enabled.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安穩 2025-01-30 02:39:00

以下配置对我有用。我认为区别在于我不使用DocumentRoot。

<VirtualHost *:80>
  ProxyPreserveHost On
  <Proxy *>
            Order deny,allow
            Allow from all
            AuthType Basic
            Authname "Password Required"
            AuthUserFile /etc/apache2/.htpasswd
            Require valid-user
    </Proxy>
  ProxyRequests Off
  ServerName 127.0.0.1:80
  ServerAlias localhost
  ProxyPass / http://localhost:9000/
  ProxyPassReverse / http://localhost:9000/
</VirtualHost>

The below config is working for me. I think the difference is I am not using a DocumentRoot.

<VirtualHost *:80>
  ProxyPreserveHost On
  <Proxy *>
            Order deny,allow
            Allow from all
            AuthType Basic
            Authname "Password Required"
            AuthUserFile /etc/apache2/.htpasswd
            Require valid-user
    </Proxy>
  ProxyRequests Off
  ServerName 127.0.0.1:80
  ServerAlias localhost
  ProxyPass / http://localhost:9000/
  ProxyPassReverse / http://localhost:9000/
</VirtualHost>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文