Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-19-2009, 02:18 PM
|
#1
|
Member
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 212
Rep:
|
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?
|
|
|
05-19-2009, 02:35 PM
|
#2
|
Member
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234
Rep:
|
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
|
|
|
05-19-2009, 04:26 PM
|
#3
|
Member
Registered: Mar 2003
Location: Washington DC, USA
Distribution: Redhat
Posts: 212
Original Poster
Rep:
|
Quote:
Originally Posted by archangel_617b
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?
|
|
|
05-19-2009, 04:38 PM
|
#4
|
Member
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234
Rep:
|
Quote:
Originally Posted by bentman78
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
|
|
|
05-21-2009, 01:52 PM
|
#5
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Rep: 
|
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.)
|
|
|
All times are GMT -5. The time now is 01:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|