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

Revision #9 has been created by MadAnd on Dec 3, 2018, 7:59:14 AM with the memo:

Fix backend pretty URL config.
« previous (#8) next (#10) »

Changes

Title unchanged

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

Category unchanged

How-tos

Yii version changed

2.0

Tags changed

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

Content changed

[...]
### 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;

location ~ /\.(ht|svn|git) {
deny all;
}
[...]
4 0
14 followers
Viewed: 144 161 times
Version: 2.0
Category: How-tos
Written by: MadAnd
Last updated by: QuPsi
Created on: Mar 12, 2015
Last updated: 2 years ago
Update Article

Revisions

View all history