$host doesn't work with case insensitive domains

David Murphy david at icewatermedia.com
Wed Sep 23 19:03:08 MSD 2009

Why don’t you use   Embedded Perl ( http://wiki.nginx.org/NginxEmbeddedPerlModule ) to    do a string to lower type function , so the path is sanitized?

David Murphy

-----Original Message-----
From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of ami
Sent: Tuesday, September 22, 2009 11:50 PM
To: nginx at sysoev.ru
Subject: $host doesn't work with case insensitive domains


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.


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

More information about the nginx mailing list