Answer the question
In order to leave comments, you need to log in
Why is the wrong website opening for me?
I have 2 websites backend and frontend. Both should open separately, but for some reason my backend pages open the same way. The fact that admin.rsi.local.
How I configured nginx
/etc/nginx/sites-enabled/rsi.local
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
root /home/ruslan/Development/rsi/frontend/web;
index index.php;
server_name rsi.local;
access_log /home/ruslan/Development/rsi/vagrant/nginx/log/frontend-access.log;
error_log /home/ruslan/Development/rsi/vagrant/nginx/log/frontend-error.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
root /home/ruslan/Development/rsi/backend/web;
index index.php;
server_name rsi.local;
access_log /home/ruslan/Development/rsi/vagrant/nginx/log/backend-access.log;
error_log /home/ruslan/Development/rsi/vagrant/nginx/log/backend-error.log;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
127.0.0.1 rsi.local
127.0.0.1 admin.rsi.local
sudo service nginx reload
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question