Revision #9 was created by MadAnd on Dec 3, 2018, 7:59:14 AM.
Fix backend pretty URL config.
Yii version
2.0
Tags
nginx,htaccess,apache,yii2,yii2-app-advanced, nginx, single domain, apache, htaccess
Content
[...]
### Nginx
For Nginx just use [official recommended configuration](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#user-content-recommended-nginx-configuration-) and remember to set `root` accordingly:
```php
server {
charset utf-8;
[...]
Modify file `frontend/config/main.php`:
```php
....
'components' => [
[...]
Modify file `backend/config/main.php`:
```php
....
'components' => [
[...]
Here is Nginx config, built on top of the [official recommended configuration](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#user-content-recommended-nginx-configuration-):
```php
server {
set $project_root /path/to/example.com;
[...]
# uncomment the following, if you want to enable speaking URL in the backend
#try_files $uri $uri/ /backend/web/index.php$is_args$args;