php - yii2+nginx, subdomain to module -


i have project working on yii2 (backend nginx). project has several modules, can conditionally called:

  • category 1 (cat1)
  • category 2 (cat2)

it required implement functionality when requesting cat1.coolsite.example, opens module available coolsite.example/cat1. accordingly, second category

try adding 2 server configs modules 1 , @ nginx error.log if doesn't trick.

server {      listen 80;      server_name cat1.coolsite.example,;      location / {             proxy_pass coolsite.example/cat1/$uri;     } } 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -