LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-24-2007, 10:28 AM   #1
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Rep: Reputation: 15
Apache2 - Restrict various websites the simple way


Dear All,

I have googled my eyes blurry, but still no joy. I think my problem is that what I want is too simple.

I have 3 internal sites on my server, Debian Etch with Apache2, Php and Mysql.

The sites are the following, /var/www/sites/A and /B and /C

I would like /A to be accessible, /B and /C to be restricted to a couple of users.

Since Apache2, the config is done in /etc/apache2/sites-available/A /B /C

What can I make to have this done? I dont mind using .htaccess or anything else for that matter.

Is it wiser to set the default to be restriced, and set /A to be allowed anonymously? If so, what shall be my approach?

Thanks a lot for any help,

Ben
 
Old 08-25-2007, 11:50 PM   #2
leandean
Member
 
Registered: Oct 2005
Location: Burley, WA
Distribution: Sabayon, Debian
Posts: 278

Rep: Reputation: Disabled
Why not use a virtual host per site. See /etc/apache2/vhosts.d. From there you can define explicitly how you want each site to behave.
 
Old 08-29-2007, 10:31 AM   #3
bence8810
Member
 
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Original Poster
Rep: Reputation: 15
Hi

I believe I am using Virtual Hosts, but a bit differently as you described,

The config files are in /etc/apache2/sites-available/

And I still dont know how to prevent access to one of them, and allow another one,

Thanks for any help, I know it may sound stupid for me asking this, but I am unable to come to a point where I could make it work,

Ben
 
  


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
Simple Apache2 problem Braynid Linux - Newbie 1 11-07-2006 02:21 PM
Simple PHP search engine for websites vharishankar General 3 09-03-2006 02:17 PM
SuSe Apache2 error: cannot adjust 'apache2' service sir_shunt SUSE / openSUSE 14 04-18-2006 11:36 AM
How to do a simple Apache2 server in SuSe 9.0? vdogvictor Linux - Newbie 4 03-24-2004 08:01 PM
Websites that sell websites..? mScDeX General 2 12-29-2003 03:01 PM

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

All times are GMT -5. The time now is 08:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration