Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a website where we want to move the admin portion to a different URL (for security purposes, according to the site owner). So, to make the admin section accessible only from this new domain name, what would be involved? The host hasn't changed so the files will be stored in the same location, just only accessible from this new url.

The main site:

The old admin:

Now that old admin should be inaccessible and the new admin should be a this new domain he bought:

But the files are still on the same server. The host hasn't changed.

Does this even make sense? The owner's rationale is that then we can turn off all write privileges to the frot portion of the site, thus securing things a bit better. As I write this I am thinking "This doesn't make sense" but I want to see what you folks think. Thanks.

share|improve this question
up vote 2 down vote accepted

This seems to have two parts: setting up a new site,, to serve the admin portion of the site, and modifying the old site so that the admin section is no longer accessible. You do not plan to move the on-disc location of the admin site.

Assuming the admin section of the site is stand-alon, and can be served from any URL you like, the first part involves creating a new virtual server,, whose DocumentRoot is {DocumentRoot of}/admin.

The second part is probably most simply achieved with the

Alias /admin /dev/null

directive, in the VirtualHost section dealing with, which should return blank documents for anything under .

And yes, the owner's rationale makes no sense to me, either.

share|improve this answer

Set the location /admin on the old host to deny from all.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.