Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Processing Site-Only Requests

Posted on 2009-05-18
2
Medium Priority
?
270 Views
Last Modified: 2012-05-07
Hey experts,

  I have one site (mysite.com) hosted on my server using apache; I need to change a configuration flag in apache to allow my server to only process requests to mysite.com and to deny all other requests; for example, if there is a site example.com pointing to my server ip, I want my server to deny requests to this site; any help on what this flag in apache is?
0
Comment
Question by:mte01
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 1200 total points
ID: 24415699
The simplest approach is to use NameBased VirtualHosts
The default virtual host (catch all) should deny anyone.

Another approach is to use mod_rewrite, eg.

RewriteCond %{HTTP_HOST} !^(www.)?mysite.com
RewriteRule .* - [L,F]
0
 
LVL 3

Author Comment

by:mte01
ID: 24415834
>>ravenpl

Many thanks for your assisting comment! (It looks great!) I'll try it, and I'll inform you of the results
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

879 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