Z
Z
ZaurK2017-05-10 08:51:17
Yii
ZaurK, 2017-05-10 08:51:17

How to upload a site on yii2 to hosting?

Hello! Tell me, what are the features when publishing on a site hosting on yii2 advanced? The hoster has a public_html folder, and I have frontend, backend, etc. folders. On local hosting, in the openserver settings, I set aliases for the frontend to the frontend/web folder, and for backenda to the backend/web folder. Please tell me what to copy and how to organize it correctly?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim Fedorov, 2017-05-10
@ZaurK

https://github.com/yiisoft/yii2/blob/master/docs/g...

T
TheElk, 2017-05-10
@TheElk

Through support, put the necessary subdomains on the necessary folders, or place .htaccess at the root with the following content:

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L]
RewriteCond %{REQUEST_URI} ^/admin$
RewriteRule ^admin /backend/web/index.php [L]
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^admin(.*) /backend/web$1 [L]

B
Boris Yakushev, 2017-05-10
@za4me

Copy the project to public_html.
Specify the path for example.com in frontend/web
Create a subdomain a.example.com and specify the path for it in backend/web.

Z
ZaurK, 2017-05-11
@ZaurK

Thanks for the answers, it seems that it turned out to be done as it was described in the manual, filled the frontend in public_html and with the admin subdomain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question