IP of server not working with password

I have a problem. I bought a small VPS and everything works fine. I have a directory and a password for it. And I have a name entry, see the IP address to another server. So when I click on the IP address: *** *** *** / directory without the username and password that I can go funny … But when I click on the folder I use A: sitea.xxx.com/directory the protected area works is what I want. How can I fix this because I do not want people to see the files in that directory.
