logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Prevent Access to server when URL is an IP address
Author
Jayson WOnder



Joined: 29 May 2015
Posts: 1
Location: Halifax, Nova Scotia, Canada

PostPosted: Fri 29 May '15 20:47    Post subject: Prevent Access to server when URL is an IP address Reply with quote

Hello,

I have a VPS with 2 IP addresses hosting various sites. These sites / domains share the 2 IP's. When I type in the IP address as a URL it takes me to the following pages...

First IP shows:
"Apache is functioning normally"

Second IP shows:
"This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser."

I do not want these to be visible and would like to have it redirect to a 403 Forbidden or similar capable of blocking access when either IP address is entered.

Any suggestions on the best way to do this?

Thanks,
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Sat 30 May '15 20:08    Post subject: Reply with quote

Well you can limit access to that vhosts to certain IP addresses.

in apache 2.4 it is for example Require ip 192.168 in 2.2 is a bit different ( allow / deny rules).
Back to top


Reply to topic   Topic: Prevent Access to server when URL is an IP address View previous topic :: View next topic
Post new topic   Forum Index -> Apache