0

I'm new at Nginx stuff. I've just migrated a website (which includes static files) from IIS to Nginx but some of my links are broken because of the case sensivity.

Please note that I've installed nginx on Debian. How can I tell Nginx these links are same :

http://s2.example.com/some/folder/kmplayer.exe
http://s2.example.com/some/folder/KmplayEr.exe

Note that I don't want to lower-case my file(s)/folder(s).. I want to make Nginx treat kmplayer.exe same as Kmplayer.exe or kmpLayeR.exe, in other words, I want to disable case sensitivity for my files..

Please help me. I've read all the articles on the internet but they didn't solve the problem.

My Server Block Configurations:

server {
listen   80;
server_name www.s2.example.com s2.example.com;
access_log /var/www/s2/logs/access.log;
error_log /var/www/s2/logs/error.log;

location / { 
    root   /var/www/s2;
    index  index.html index.htm;

}
}
1

Haven't tried it but this might work: Install a samba server on the server and set case sensitive = False. Move your data to /var/foo. Share /var/foo though samba. Mount 127.0.0.1:/var/foo at /var/www/s2.

  • Thank you Mark for answering.. Can I share /var/www/s2 at the first? because there are tons of data located at /var/www/s2 and I cant move them to /var/foo. If I do like that, will Nginx and Samba work together? and another question is, will Samba cause security problems? btw, why Nginx doesn't have any modules like Apache's mod_speling? – Ramin King Jan 10 '17 at 6:16
  • 1
    You will need to configure nginx to use the samba mountpoint. How you accomplish that is up to you. If configured correctly Samba will not cause security problems. I don't know why nginx doesn't have mod_speling-like functionality. – Mark Wagner Jan 10 '17 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.