How to create configure about https default

Hi,

I want https://192.168.0.1 can return 500,but if there is a
https://localhost sites,browsering to https://192.168.0.1 will go to
https://localhost.

How can i avoid this.