LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache2 - Restrict various websites the simple way (https://www.linuxquestions.org/questions/linux-server-73/apache2-restrict-various-websites-the-simple-way-579492/)

bence8810 08-24-2007 10:28 AM

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

leandean 08-25-2007 11:50 PM

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.

bence8810 08-29-2007 10:31 AM

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


All times are GMT -5. The time now is 03:53 PM.