cancel
Showing results for 
Search instead for 
Did you mean: 

multi-wesbsite admin url not working

multi-wesbsite admin url not working

I have a 2 website under different domains

1. domain1

2. domain2

 

both websites working through nginx:443 with routing to nginx:80 

server {
listen 80;
listen [::]:80;
server_name domain1;

set $MAGE_ROOT /opt/domain1/current;
set $MAGE_RUN_TYPE "website";
set $MAGE_RUN_CODE "domain1";
include /opt/domain1/current/nginx.conf;
}
 
server {
listen 80;
listen [::]:80;
server_name domain2;

set $MAGE_ROOT /opt/domain1/current;
set $MAGE_RUN_TYPE "website";
set $MAGE_RUN_CODE "domain2";
include /opt/domain1/current/nginx.conf;
}
 
all websites frontends works correctly, however admin works only from domain1 which is base_url in a scope of Default Config where base url is domain1

in a scope of website2 with domain2 admin not working

is it expectable? or what I'm doing wrong

domain1/admin - works
domain2/admin - doesn't work