server {
#your other config....
#redirect all request from your.domain.com to your wordpress app.
if ($host = your.domain.com) {
#redirect traffic to wordpress upstream
}
#redirect all unsecure www to secure www
if ($host = your.sub.domain.com) {
#redirect traffic to flask upstream
}
}
1条答案
按热度按时间qco9c6ql1#
您可以使用反向代理(如nginx)来解决这个问题。通过使用nginx,您将能够根据请求来自的域将请求重定向到正确的应用程序。
pseudo nginx配置: