我有一个应用程序运行在localhost:8080
,我configurationNginix使其运行localhost/
我有另一个应用程序运行在localhost:3000
我想要做的就是把我redirect到localhost:3000/[whatever]
当我最初去localhost/[whatever]
类似的东西:
location /[SOMETHING] { proxy_pass http://localhost:3000/[THAT_SAME_THING_ABOVE]; }
是否有可能configurationNginx做这个行为? 如果是的话如何? 谢谢
你可能想要使用:
location = / { proxy_pass http://localhost:8080 } location / { proxy_pass http://localhost:3000 }
查看位置和proxy_pass文档。