I have a local website whose root directory is: {code ...} I installed yii to the directory yii (yii. the bat file is located in yiiyii. bat) then how can I access my website? I found that accessing frontendwebindex. php will display the yii welcome page... I have a local website. The root directory of this website is:
DocumentRoot /var/www/site1/public_html
I installed yii to the directory/yii (the yii. bat file is located in/yii. bat)
Then how can I access my website?
I found that accessing/frontend/web/index. php will display the yii welcome page.
What I want to know now is:
1) Is it true that the access path of yii after installation is/frontend/web/index. php?
2) If this is the case 1, do you still need to change the DocumentRoot of the website to this:
DocumentRoot /var/www/site1/public_html/frontend/web
Reply content:
I have a local website whose root directory is:
DocumentRoot /var/www/site1/public_html
I installed yii to the directory/yii (the yii. bat file is located in/yii. bat)
Then how can I access my website?
I found that accessing/frontend/web/index. php will display the yii welcome page.
What I want to know now is:
1) Is it true that the access path of yii after installation is/frontend/web/index. php?
2) If this is the case 1, do you still need to change the DocumentRoot of the website to this:
DocumentRoot /var/www/site1/public_html/frontend/web
You need to change the path to/var/www/site1/public_html/frontend/web. This is the frontend, and there seems to be a backend, corresponding to the background management. You can use virtualhost to set the access path.
First, Yii2 is installed by default and provides two sets of application Advanced and basic (now referred to as basic application). The main application is Advanced (we call it Advanced application for the time being)
The biggest difference between Advanced and basic is that the two directories are separated: the backend directory and the frontend directory. Actually, compared with basic, they are actually two Yii applications. For example, the Model part is stored in the Common directory. this advanced application is suitable for complex and large-scale projects. It is used to completely split the business logic from the front and back ends. Therefore, accessing the front and back ends is equivalent to accessing two different applications.
Therefore, when configuring the Vhost webroot directory, assume that the domain name is www.xxx.com, then www.xxx.com points to the foreground directory/frontend/web/
Configure level-2 domain name root.xxx.com pointing to/backend/web/
After the answer is complete, ask for 15 Prestige -_-
We recommend that you start with basic for the Yii2 package.
Yii2 Installation Method see: http://xlbd.net/xlbd/1995.html
There is another YII victim.