LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-19-2009, 02:18 PM   #1
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 212

Rep: Reputation: 30
Deny access to alias for certain domains


I have apache 2 running. I have a couple of aliases like /webmail and /phpmyadmin..etc..etc

I have multiple domains on my server. I don't want every domain to be able to access every alias.

For example, I have:
www.domain1.com/webmail
www.domain1.com/phpmyadmin
www.domain1.com/admin
www.domain2.com/webmail.

Webmail points to a webmail program but phpmyadmin and /admin point to other tools obviously. How do I go about denying those aliases from certain domain but not others?
 
Old 05-19-2009, 02:35 PM   #2
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
IIRC you can just configure the Aliases within the VirtualHost... I don't know that you can white-list/black-list Aliases for some sub-set of your virtual hosts. Does that help?

- Arch
 
Old 05-19-2009, 04:26 PM   #3
bentman78
Member
 
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 212

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by archangel_617b View Post
IIRC you can just configure the Aliases within the VirtualHost... I don't know that you can white-list/black-list Aliases for some sub-set of your virtual hosts. Does that help?

- Arch
I see,
what about putting .htaccess files in the alias directories and rewrite according to http referrer?
 
Old 05-19-2009, 04:38 PM   #4
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Quote:
Originally Posted by bentman78 View Post
I see,
what about putting .htaccess files in the alias directories and rewrite according to http referrer?
Or the HTTP_HOST. Sounds like it would work to implement blacklist / whitelist by domain.

- Arch
 
Old 05-21-2009, 01:52 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by archangel_617b
IIRC you can just configure the Aliases within the VirtualHost
IMO, that would be the clean way to handle the situation. Alias is legitimate within a virtual host context, so just define it there and it won't mean anything outside of that virtual host. (You'll want to test that, of course.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vhost.conf and Alias to share common files across domains - impact on server load? Trance-formation Linux - Server 2 05-19-2009 04:32 PM
Exim4+courier+webadmin: multiple domains and alias problem djib Debian 1 06-16-2008 05:04 PM
postfix alias domains csaunders Red Hat 1 04-17-2007 11:44 AM
Deny Domains jonfa Linux - Security 1 12-24-2005 03:56 PM
access and deny mchitrakar Linux - Security 8 04-24-2004 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration