Hi guys! I followed this tutorial to install nginx. It works nice for domains, which begins with www. Cause in this tutorial we point the root to /var/www/www.$host/web. But I have some sites, which are available in subdomains, so the root for this sites is /var/www/subdomain.$host/web. I am not so good in all these "rewrite things", so what should I change in nginx.conf to make this sites work? Thank you! P.S. Why we should use this in nginx.conf?
So at the moment the solution I have is to remove www in the root path so it looks like /var/www/$host/web. But, now the problem is that site is not accessible, if I am using it's address without www. The only thing I can do is to make manually the symlink like domain.com pointing to root folder of this web.