Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: http://mysite.com

The old admin: http://mysite.com/admin/

Now that old admin should be inaccessible and the new admin should be a this new domain he bought: http://mysiteadmin.com/

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

2 Answers 2

up vote 2 down vote accepted

This seems to have two parts: setting up a new site, http://mysiteadmin.com, 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, mysiteadmin.com, whose DocumentRoot is {DocumentRoot of mysite.com}/admin.

The second part is probably most simply achieved with the

Alias /admin /dev/null

directive, in the VirtualHost section dealing with mysite.com, which should return blank documents for anything under http://mysite.com/admin .

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

 
discard

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.