[英]Meteor, Angular routes, Nginx and SSL - how to route /path to another server with rewrite
I have: 我有:
How can I "rewrite" doma.in/blog to the blog, but with this same URL? 如何“重写”doma.in/blog到博客,但使用相同的URL? (without redirect). (没有重定向)。
Try this nginx configuration: 试试这个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
}
As for angular, it simply needs to avoid/skip the route, as discussed here on SO 至于角度,它仅仅需要避免/跳过路线,如所讨论这里对SO
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.