$host doesn't work with case insensitive domains

ami nginx-forum at nginx.us
Wed Sep 23 08:50:07 MSD 2009


Hi

for example,

domain.com will work fine.
but if I will request Domain.com/DOMAIN.COM/domAin.com
it will result in a Not Found 404 (because there is no "/var/www/html/domAin.com" etc.)

I used the $host variable for virtual hosts
root /var/www/html/$host;

it happens because the directory is in lowercase name in linux  (/var/www/html/domain.com)
so is there anyway to make nginx read all incoming domains as lowercase ones ?

p.s sorry for the bad english.

thanks.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,8548,8548#msg-8548






More information about the nginx mailing list