tilakraj wrote:how to avoid these kind of cases, how to restrict some other peoples have to register some illegal domains like (porn or some other sites) with our server ip, How to avoid this kind of problem,We need your help for this kind of case.
a) why should someone do this? If a domain name is registered to your IP, you are responsible for the content - so if you dont show porn (for example), you dont show porn.
b) anyway, using namebased virtualhosts, you can assign multiple domain names for your single Server IP. If the requested domain name (for example a porn domain name) does not match any of the configured domain names, Apache uses the first configured virtualhost as a default handler. You may issue an error message or whatever you want.
See the documentation about virtualhosts for more information.