Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx -- Yii2通用后台 二级目录配置 #2

Open
anjocee2 opened this issue Dec 12, 2016 · 0 comments
Open

nginx -- Yii2通用后台 二级目录配置 #2

anjocee2 opened this issue Dec 12, 2016 · 0 comments

Comments

@anjocee2
Copy link

.env文件:

FRONTEND_URL = /yii2admin/frontend/web
BACKEND_URL = /yii2admin/backend/web
STORAGE_URL = /yii2admin/storage

nginx.conf文件:

# 前台重写
location /yii2admin/frontend/web/ {
	try_files $uri /yii2admin/frontend/web/index.php?$args;
}

# 后台重写
location /yii2admin/backend/web/ {
	try_files $uri /yii2admin/backend/web/index.php?$args;
}

(原doc/nginx.conf示例文件中没有这一部分,经测试,可用)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant