13
이 nginx에하는 사용자 에이전트에 따라 아파치에서오고와 나는 기본적으로 다음을 수행 할 재 작성 :Nginx에 프록시 또는, 내가 새로 온
사용자 에이전트를 기반으로: 아이폰 : iphone.mydomain.com로 리디렉션
안드로이드는 :
페이스 북을 android.mydomain.com로 리디렉션 : otherdomain.com하는 리버스 프록시
다른 모든 : ...에 재
,하고 그것을 다음과 같은 방법으로 시도 :
location /tvoice {
if ($http_user_agent ~ iPhone) {
rewrite ^(.*) https://m.domain1.com$1 permanent;
}
...
if ($http_user_agent ~ facebookexternalhit) {
proxy_pass http://mydomain.com/api;
}
rewrite /tvoice/(.*) http://mydomain.com/#!tvoice/$1 permanent;
}
을하지만 지금의 nginx를 시작할 때 오류가 발생합니다 :
nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except"
그리고 내가 그것을 또는 어떤 문제가 작업을 수행하는 방법을 얻을니까.
감사