Answer the question
In order to leave comments, you need to log in
How to forward static requests through nginx?
Hello! Can you please tell me how to redirect nginx requests for static?
example: a user asks us for an image from the site site.ru/uploads/image.jpg
and nginx pulls the image from another address, for example cdn.site.ru/image.jpg
How to do this?
In general, I just want to connect to CDN Selectel, but I can’t find a travel guide anywhere.
Answer the question
In order to leave comments, you need to log in
proxy_pass
Only you are doing something weird. CDNs are usually connected just to offload their server, so that clients go for static bypassing your server.
Hey!
Selectel has a "Cloud storage" section in its knowledge base - https://kb.selectel.ru/23136007.html . There are instructions on how to work with the repository and distribute static data.
Inside there is a subsection "Using a CDN" - https://kb.selectel.ru/24380446.html (how to connect CDN Selectel, which providers have CDNs in general, about clearing the cache and disabling).
There is also a large CDN section - https://kb.selectel.ru/42077358.html. There, in general, about everything and instructions for connecting.
If you need advice on working with nginx or need to implement something specific, you can register in the control panel https://my.selectel.ru/login/and write a ticket with questions - the guys from technical support will try to give advice.
You can also call +7 (800) 555-06-75, tell about your task, and pre-sale engineers will help organize a solution.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question