Welcome! Log In Create A New Profile

Advanced

Subdomain configuration problem

murali kumar
July 19, 2015 12:04PM
Hi,

I'm beginner in nginx, and i have searched google and mailing list but no
luck.

my nginx.conf:

http{
server{
listen 80;
server_name example.com www.example.com;
location / {
proxy_pass http://127.0.0.1:aaaa/;
}
}
server{
listen 80;
server_name subdomain.example.com;
location / {
proxy_pass http://127.0.0.1:bbbb/;
}
}
#rest of the default config like acces log, etc
}



Problem is after adding server block for subdomain, both request (
example.com, subdomain.example.com) loading only example.com in browser.
If i place subdomain server block listing as first one, both request (
example.com, subdomain.example.com) loading subdomain.example.com in
browser.

Please suggest me what could be the problem.


Thanks in Advance!!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Subdomain configuration problem

murali kumar July 19, 2015 12:04PM

Re: Subdomain configuration problem

Maxim Dounin July 19, 2015 11:16PM

Re: Subdomain configuration problem

murali kumar July 20, 2015 08:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 146
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready