微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

angularjs – Meteor,Angular routes,Nginx和SSL – 如何使用重写路由/路径到另一台服务器

我有

> DigitalOcean VPS
>在Angular中使用路由的流星应用程序
> Nginx作为反向代理
>我的域的SSL,配置了Nginx(也将http重定向到https)
>另一个托管(!)与wordpress博客那里
>将DNS设置为DigitalOcean VPS和Meteor应用程序的doma.in就在那里

如何“重写”doma.in/blog到博客,但使用相同的URL? (没有重定向).

@R_404_5620@:

试试这个Nginx配置:

location  ^/blog {
  rewrite /blog(.*) $1  break; #cut the /blog path
  proxy_pass         http://blog.com:8000; #then pass it to the blog domain/port
  proxy_redirect     off;  #without redirecting 
  proxy_buffering off;    #or buffering
}

至于角度,它只需要避免/跳过路线,如SO上讨论的here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐