Question
Why my domain xyz.com is redirect to abc.com?
I have hosted two wordpress websites on single droplet and trying to host another one which is xyz.com but the problem is that when I open xyz.com it redirects to my default server domain name abc.com please help me in this, I am stuck from 2 days.
DNS setting:
A record @ 198.xxx.xxx.xxx
CNAME:www xyz.com.
CNAME:* xyz.com.
ns:ns1.digitalocean.com.
ns:ns2.digitalocean.com.
ns:ns2.digitalocean.com.
Server Block:
server {
listen 80;
listen [::]:80;
root /var/www/xyz.com/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name xyz.com www.xyz.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Can you please post the server block to abc.com.
I see that you have two Cname records, where are they pointed to?
If you get a chance to post your server block for the second site that may reveal the issue - please update when you’re able.