Difference between #9 and #10 of
yii2-app-advanced on single domain (Apache, Nginx)

Revision #10 has been created by QuPsi on Sep 13, 2021, 7:55:36 PM with the memo:

Added info for how to get prettyUrl to work in nginx configuration in the first method.
« previous (#9) next (#11) »

Changes

Title unchanged

yii2-app-advanced on single domain (Apache, Nginx)

Category unchanged

How-tos

Yii version unchanged

2.0

Tags unchanged

nginx,htaccess,apache,yii2,yii2-app-advanced,single domain

Content changed

[...]
index index.php;
...
}
```

If you are using prettyUrl, you may need to add the following lines to your Nginx configuration:
 
 
```php
 
server {
 
location /backend {
 
        try_files $uri $uri/ /backend/index.php$is_args$args;
 
    }
 
    
 
    location / {
 
        try_files $uri $uri/ /index.php$is_args$args;
 
    }
 
}
 
```
 
 

Option 2: The Hard Way
--------

Try this option only if the previous one does not work for you. Because any additional rewrite rules is a performance hit.
[...]
4 0
14 followers
Viewed: 147 553 times
Version: 2.0
Category: How-tos
Written by: MadAnd
Last updated by: QuPsi
Created on: Mar 12, 2015
Last updated: 3 years ago
Update Article

Revisions

View all history