My configuration: {code...} is now available at the front end, but the background is not correct. I use the yii2 framework. When {code...} is not added before, the front-end homepage will become a download page. Now I want to match the url into the background and I don't know how to do it. Now I go to the background www. xxx. combackend to display 404, new... My Configuration:
server {listen 80;server_name www.xxx.com xxx.com;# server_name_in_redirect off;root /alidata/www/default/yooao/frontend/web;location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }location / {index index.php ;root /alidata/www/default/yooao/frontend/web;}location ~ ^/backend$ {index index.php ;root /alidata/www/default/yooao/backend/web;}}
I can go to the front-end, but the back-end is incorrect. I use the yii2 framework. Not added before
`location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }`
When the front-end homepage is changed to a download page. Now I want to match the url into the background and I don't know how to do it. Now I am going to the background for www.xxx.com/backenddisplay.
Reply content:
My Configuration:
server {listen 80;server_name www.xxx.com xxx.com;# server_name_in_redirect off;root /alidata/www/default/yooao/frontend/web;location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }location / {index index.php ;root /alidata/www/default/yooao/frontend/web;}location ~ ^/backend$ {index index.php ;root /alidata/www/default/yooao/backend/web;}}
I can go to the front-end, but the back-end is incorrect. I use the yii2 framework. Not added before
`location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }`
When the front-end homepage is changed to a download page. Now I want to match the url into the background and I don't know how to do it. Now I am going to the background for www.xxx.com/backenddisplay.
Official documentation clearly shows how to configure nginx, address is: http://www.getyii.com/doc-2.0/guide/start-installation.html#nginx
If you are using the pro edition, after the project Initialization is complete, frontend and backend must be configured separately, that is, two vhosts must be configured.