?
Solved

BLock access to webserver using IP address

Posted on 2003-03-12
5
Medium Priority
?
358 Views
Last Modified: 2010-03-04
hi,
 i have got apache running with name based virtual hosts. I am hosting aroung 5 sites on the same sevver. The problem is when I type the IP address of the server in the browser, the pages of the first virtual host in httpd.conf gets displayed.

 I dont want any one to access my server using IP address on the internet. How to block this in apache?? I tried specifying an desfault virtual host but doesnt seem to work.

 It would be great , if anyone can enligthen me on this issue
0
Comment
Question by:kiran0212
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
samri earned 100 total points
ID: 8125739
This is common, the first Virtualhost will be the default for any request not matching any other vhost.

how does you default vhost configuration looks like.

how about

<VirtualHost *>
  Order allow,deny
</VirtualHost>

more info: http://httpd.apache.org/docs/mod/mod_access.html
0
 
LVL 8

Assisted Solution

by:heskyttberg
heskyttberg earned 100 total points
ID: 8127514
Hi!

Create a virtual host that has IP as name.
That shoudl do it.

Regards
/Hans - Erik Skyttberg
0
 
LVL 15

Expert Comment

by:samri
ID: 8134584
and I think you would still need to have the restriction on the vhost.
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question