Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-24-2007, 11:28 AM   #1
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,

Old 08-26-2007, 12:50 AM   #2
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, 11:31 AM   #3
Registered: Nov 2004
Location: Budapest, Hungary
Distribution: Debian
Posts: 110

Original Poster
Rep: Reputation: 15

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,



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

All times are GMT -5. The time now is 08:54 AM.

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