1. Installing yii2-starter-kit on Windows 10 and Nginx 1.10, run the following in the command line: php console/yii app/setup, as shown in Figure 1

2. Error: create unique index idx_article_slug on {{%article}} (slug) …Exception: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes, as shown in Figure 2
Translation: Create unique index idx_article_slug on {{%article}} (slug) …Exception: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

3. Creating the index idx_article_slug on the slug field failed, as shown in Figure 3
SQL: ALTER TABLE `article` ADD UNIQUE INDEX `idx_article_slug` (`slug`)
#1071 – Specified key was too long; max key length is 767 bytes

4. Locate the slug field in the {{%article_category}} and {{%article}} tables and change its length to 255, because both tables have index creation operations, as shown in Figure 4

5. Clear the database and run php console/yii app/setup again in the command line; it prompts that the migration was successful, as shown in Figure 5

6. Opening the frontend application returns the error: symlink(): Cannot create symlink, error code(1314), as shown in Figure 6

7. Because the development environment does not support symlink(), I decided to set ‘linkAssets’ => true by editing the file: .dev, as shown in Figure 7
LINK_ASSETS=false

8. The frontend application now opens normally, as shown in Figure 8

9. Opening the About page returns a 404, as shown in Figure 9

10. Analyzing the cause, I found that URL rewriting was enabled but Nginx did not support it. I edited nginx.conf, as shown in Figure 10
try_files $uri $uri/ /index.php?$args;

11. Opening the About page again works normally, as shown in Figure 11

12. Opening the backend application works normally, as shown in Figure 12

13. An alternative solution to point 7 is to run the console as an administrator, which resolves the issue of symlink() not being supported, as shown in

