Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Isn't it necessary to create both there and there? Or do you have different domains static files use the same? Or vice versa - static files are different, but scripts are all the same?
If you have nginx just as a proxy, then you don't need it. But this makes little sense. It is better to set it on static, then you need to create hosts here and there. Although it all depends on the implementation of the hosts themselves. Everything can be beautifully configured so that nginx does not pull.
Like /var/www/domen.com/, and take domen.com as a variable from the current host, but then all sorts of www.domen.com , etc. disappear.
and Thai and there virtual hosts are created.
describe in more detail the question, what do you have and what do you want to receive
If I did not create virtual hosts in nginx, then different domains still work (Apache shows them). Static files of all domains can be described through location within one server in nginx (as far as I understand), let's say there are site1.com/uploads and site2.ru/img. I'm just describing location /uploads and location /img within the same server
. The main reason for using nginx, I see saving RAM.
Actually questions:
1. Than such scheme is bad?
2. Will it work at all? That is, will nginx process statics in this case, or will Apache actually give it away, and I will be naively ignorant?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question