I'm having redirection issues when I try to access DomainB on my browser, for some reason I get redirected to DomainA, what could be going on here?
(This is my sites-available folder)
Btw I removed DomainB from sites-enables
, and I still get the same redirection... could it be a DNS issue and not an nginx issue?
##
## /etc/nginx/sites-available/DomainC
##
server {
listen 80;
server_name domainC.com www.domainC.com;
return 301 https://domainA.com/blog$request_uri;
}
##
## /etc/nginx/sites-available/DomainA
##
server {
listen 80;
server_name domainA.com www.domainA.com;
return 301 https://domainA.com$request_uri;
}
server {
listen 443 ssl;
server_name www.domainA.com;
include domainA.ssl.conf;
return 301 https://domainA.com$request_uri;
}
server {
server_name domainA.com;
root /var/www/domainA.com;
listen 443 ssl;
index index.html;
autoindex off;
include common.conf;
include domainA.ssl.conf;
}
##
## /etc/nginx/sites-available/DomainB
##
server {
listen 80;
server_name domainB.cl;
return 301 http://www.domainB.cl$request_uri;
}
server {
listen 80;
server_name www.domainB.cl;
root /var/www/domainB.cl;
index index.html;
}
EDIT: I think that it may be related to the fact that if for some reason I go to http://vps_ip/
(eg 192.123.123.123), I also get redirected to https://DomainA.com/blog/