0

so my vps is running ubuntu 17.04 and i have configured my dns pointing to my vps on both domain @

here is my nginx folder structure

enter image description here

this is my server block code for w3saver.com

filepath: /etc/nginx/sites-available/w3saver.com

`server {
    listen 80;
    listen [::]:80;
    server_name w3saver.com www.w3saver.com;

    root /var/www/w3saver.com/html;
    index index.html index.htm index.nginx-debian.html;

    location / {
            try_files $uri $uri/ =404;
    } }`

and this server block is for w3youtube.com

filepath: /etc/nginx/sites-available/w3youtube.com

`server {
    listen 80;
    listen [::]:80;
server_name w3youtube.com;

    root /var/www/w3youtube.com/html;
    index index.html index.htm index.nginx-debian.html;

    location / {
            try_files $uri $uri/ =404;
    } }`

so my problem is when ever i go to "w3youtube.com" page i get redirect to "w3saver.com" page (both domains are serving same page) so what is wrong with that i can't able to figured it out!

ps: i am expecting both domain should serve dedicated static html pages. insted of single html on both domains

this is what i am getting right now.

result in domain1

enter image description here

also same result in domain2 enter image description here

thanks in advance.

Kartik Garasia
  • 1,324
  • 1
  • 18
  • 27

0 Answers0