【问题标题】:Apache Virtual Proxypass nodejs application - Empty pageApache Virtual Proxypass nodejs 应用程序 - 空页面
【发布时间】:2018-05-14 16:01:22
【问题描述】:

我正在为我的节点 js 应用程序运行一个带有 proxypass 的 apache 服务器。

这是我在虚拟主机中得到的:

ProxyRequests Off
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:3333/
ProxyPassReverse / htttp://127.0.0.1:3333/
<Location />
    Order allow,deny
    Allow from all
</Location>

基本上我想将每个请求重定向到我的 nodejs 应用程序,并且当我使用直接链接时它可以工作。

我的问题是,当我尝试使用层级应用程序(例如 Postman)访问它时,它不会返回我的 html 页面。我需要分层应用程序和站点来获取元标记以在社交网络(FB、TW、...)上共享。

我的虚拟主机知识真的很薄弱,如果有人能帮助我解决这个问题,我将不胜感激。

谢谢!

【问题讨论】:

    标签: node.js apache proxy reverse-proxy virtualhost


    【解决方案1】:

    这应该可以正常工作

    <VirtualHost *:80>
       ProxyPreserveHost On
    
       ProxyPass / http://127.0.0.1:3333/
       ProxyPassReverse / htttp://127.0.0.1:3333/
    </VirtualHost>
    

    【讨论】:

    • 感谢您的回答,但它不起作用。我在邮递员处收到了未经授权的 401。有什么线索吗?
    猜你喜欢
    • 2015-08-08
    • 2021-05-16
    • 1970-01-01
    • 1970-01-01
    • 2020-11-22
    • 1970-01-01
    • 1970-01-01
    • 2017-04-12
    • 2014-03-01
    相关资源
    最近更新 更多