Networking
-> Load Balancin
g -> 에서 Host and path rules
'/', '/blog/', 'features/' 및 '/pricing/'을 wordpress 백엔드/에 매핑하기 위한 URL 맵을 정의했습니다.
그러나 '/'에 대한 구성 테스트를 추가하면 다음 오류 메시지가 나타납니다.
내 의도는 WordPress 백엔드에 매핑할 몇 가지 잘 알려진 URL을 갖고 나머지는 다른 백엔드 서비스로 연결되는 것입니다.
위 규칙의 '/'가 'www.examples.com/'을 wordpress 서비스에 매핑하지 않는 이유는 무엇입니까?
편집하다
1) Grisha Levit가 댓글에서 요청한 대로
>> gcloud compute backend-services describe backend-service-url-mapper
affinityCookieTtlSec: 0
backends:
- balancingMode: UTILIZATION
capacityScaler: 1.0
description: ''
group: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-c/instanceGroups/instance-group-forward-to-gae
maxUtilization: 0.8
connectionDraining:
drainingTimeoutSec: 300
creationTimestamp: '2017-01-16T18:18:24.815-08:00'
description: ''
enableCDN: false
fingerprint: jx1UyRlAaXY=
healthChecks:
- https://www.googleapis.com/compute/v1/projects/myproject/global/httpHealthChecks/health-check-wordpress
id: '5709193638199738399'
kind: compute#backendService
loadBalancingScheme: EXTERNAL
name: backend-service-url-mapper
port: 80
portName: http
protocol: HTTP
selfLink: https://www.googleapis.com/compute/v1/projects/myproject/global/backendServices/backend-service-url-mapper
sessionAffinity: NONE
timeoutSec: 30
기본적으로 nginx 서버의 무리입니다.
2) 모든 규칙의 전체 그림은 다음과 같습니다.
답변1
이와 같은 설정은 두 개의 백엔드(NGINX 및 Apache)를 사용하여 나에게 효과적이었습니다.
HTTP 요청은 다음과 같이 리디렉션되었습니다.
http://test.mydomain.com/ NGINX에
http://test.mydomain.com/blog NGINX에
http://test.mydomain.com/pricing NGINX에
http://test.mydomain.com/anything 아파치에게
상태 확인이 작동하고 로드 밸런서가 새 설정을 업데이트하는 데 몇 분 정도 걸릴 수 있습니다. 참조 문서를 찾을 수 있습니다여기.