htaccess代理节点应用 [英] htaccess proxy to node app
本文介绍了htaccess代理节点应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将子域代理到运行在端口3000上的节点应用程序。它代理对文件的请求,例如subdomain.domain.com/jquery.js。它工作正常,并显示节点提供的文件。但是,当我尝试访问子域的根目录时,我猜想apache尝试找到index.php并失败,并显示消息无法获取/index.php
。我如何使其能够正常工作,使其能够满足节点应用程序提供的任何服务?
I am trying to proxy subdomain to node application which is running on port 3000. It proxies requests to files e.g subdomain.domain.com/jquery.js. It works fine and shows file served by node. But when I try to access the root of subdomain then I guess apache tries to find index.php and fails with message Cannot GET /index.php
. How can I make it work so it will serve whatever provided by node app?
我的htaccess
my htaccess
RewriteEngine On
RewriteRule ^(.*)$ http://127.0.0.1:3000/$1 [P,L]
RewriteRule ^$ http://127.0.0.1:3000/ [P,L]
RewriteEngine On
推荐答案
DirectoryIndex disabled
已解决
这篇关于htaccess代理节点应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文