HTTPS를 통해 액세스 할 때 동일한 하위 도메인으로 리디렉션해야하는 여러 개의 와일드 카드 하위 도메인 (_foo.example.com, bar.example.com 등)이 있습니다. 우리의 보안 도메인.와일드 카드 하위 도메인을 nginx를 사용하여 다른 최상위 도메인으로 리디렉션
몇 가지 예 :
- https://foo.example.com =>https://foo.secure.com
- https://foo.example.com/some/path =>https://bar.secure.com/some/path
- https://bar.example.com =>https://bar.secure.com
하지만 난 구문에 대해 확실하지 않습니다. 여기에 내가 시도하고있는 무슨이다 :
server {
listen 443;
server_name *.example.com;
rewrite ^(.*) https://*.secure.com$1 permanent;
}
내가 들어오는 하위 도메인을 캡처하고 다시 작성을 사용하지 않는 때문에 분명히 작동하지 않습니다. 이 (안된) 같은
에 나는이 솔루션을 좋아하고 그것은 (많이 내 자신의 목적을 위해 수정) 나를 위해 일하고있다. – Pablo