#1626 closed defect (invalid)

sub domain redirecting not as declared

Reported by: anair.tracmor.com@… Owned by:
Priority: critical Milestone:
Component: other Version: 1.10.x
Keywords: Cc: anair@…, ssethumadhavan@…
uname -a: Linux ip-172-31-3-87 4.4.0-1066-aws #76-Ubuntu SMP Thu Aug 16 16:21:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.10.3 (Ubuntu) built with OpenSSL 1.0.2g 1 Mar 2016 TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads

Description

We are using Nginx on our production server. We faced an issue recently. Suppose we have a subdomain axz.tracmor.com with A record pointed to our server where our code 1 is hosted. Another subdomain xyz.tracmor.com is declared with CNAME pointing to axz.tracmor.com. Both these subdomains share the same code 1 . Then we declare another subdomain abc.tracmor.com with a different code 2 and CNAME as axz.tracmor.com. Now when we hit the page axz.tracmor.com and abc.tracmor.com, it directs us to the codes 1 and 2, respectively. But on hitting xyz.tracmor.com it directs us to code 2 instead of code 1. On changing our subdomain abc.tracmor.com to ayz.tracmor.com , we are able to hit code 1 for xyz.tracmor.com. This means that Nginx is redirecting the requests depending on alphabetical order instead of what is declared at the DNS setting. Kindly provide some insight to this issue.

Change History (1)

comment:1 Changed 16 months ago by mdounin

  • Resolution set to invalid
  • Status changed from new to closed

You wrote a description of your DNS configuration. However, nginx does not use your DNS configuration to route or handle requests. Instead, it uses his own nginx.conf configuration - you can use it to configure listening sockets and appropriate processing of requests. Please refer to http://nginx.org/en/docs/ for documentation.

If you have further questions, please use support options available.

Note: See TracTickets for help on using tickets.