問題是這樣的:我在symfony2當(dāng)中配置了路由,前綴分別是分別是:/admin/api/wap...等?,F(xiàn)在我想通過訪問三個(gè)自域名去訪問這分別三個(gè)對應(yīng)的路由,分別是admin.domain.com=>/admin/*api.domain.com=>/api/*wap.domain.com=>/wap/*目前在nginx下配置了,但是卻不起效,想看看各位對這個(gè)有什么見解和方法經(jīng)驗(yàn),指點(diǎn)一下,現(xiàn)在被困住了。server{listen80;server_namedomain.com~^(?.+)\.domain\.com;.....location/{indexapp.php;try_files$uri@rewriteapp;}location@rewriteapp{rewrite^(.*)$/app.php/$subdomain$1last;}......}望各位指點(diǎn)...謝謝。
nginx 如何配置 subdomain rewrite到symfony2指定路由
大話西游666
2019-04-07 11:18:40