E
E
Evgeny_Shestakov2016-04-27 21:30:17
Nginx
Evgeny_Shestakov, 2016-04-27 21:30:17

What is the best way to publish Yii2 assets when working with several backends and return from one frontend?

there is one frontend (nginx) and several backends (php-fpm), while on each backend an application is deployed that publishes statics (assets) locally, while the return of pages is proxied from each of the backends to the front, and the statics are returned directly from the frontend server (it has a copy of the statics from each of the backends), the question is how to automate the return of published resources (assets manager) from the frontend, without manually copying the statics to it, which is formed every time it changes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2016-04-28
@bitver

The AssetsManager has a baseUrl parameter, it can be changed in the settings of the backs (each one has its own) that leads to its own subdomain. Next, raise the server for all these subdomains, whose root is in the asset folder (again, each has its own). Should earn.
PS I didn't understand a little what you are publishing from backs to LAN and what's with the proxy, so I could be wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question