The problem was in mediawiki I think. I changed both ports - now they are the same. And everything works from the internet. Thanks. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,212938,212991#msg-212991