Обслуживание index.html и других файлов через ngnix и CDN (Облачные Файлы Rackspace)

Установите сервер центра обработки вызовов как вторичный сервер для зоны IT.

0
задан 27 August 2011 в 10:16
1 ответ

Well, there's no point in doing a redirect to a CDN (as per your example config), because by the time the request/response has gone through your server, and then the browser makes a new request to the CDN and gets the response, you could just have sent the client the darned content and been done with it. There's also issues with trying to do this with proxy CDNs that would be entertaining to work around in a robust fashion.

The typical way of utilising a CDN is that all of the static assets (images, JS, CSS) can be served out of a subdomain (like cdn.example.com) and the pages that users directly request contain the links to the CDN assets on the separate domain. It is far more rare (though not unknown) to try to serve everything out of a CDN, but if you do want to go that way, you really have to serve everything -- no dynamic content, nothing. The closest you can come is to have your dynamic content on one domain, and your static pages on the CDN, and link between them, but quite honestly, that way lies probable madness without a very good automated site build and distribution system.

2
ответ дан 4 December 2019 в 14:40

Теги

Похожие вопросы