Project

General

Profile

How to set access control on public directory

Added by uthra Rao about 16 years ago

I want to allow access to redmine/public page only for certain IP addresses. I have configured redmine to work under apache on a Linux server. I have the following section in my httpd.conf file:

SetEnv RAILS_ENV production
<Directory "/redmine/public">
AllowOverride all
order deny,allow
deny from all
allow from localhost
allow from IPaddress-1
allow from IPaddress-2
</Directory>

The public page is coming up for everybody. How do I restrict access and allow only the two IP addresses to be able to view the page?

Thanks for your help.

UR.


Replies (2)

RE: How to set access control on public directory - Added by Felix Kokocinski about 16 years ago

Hi UR,

"/redmine/public" probably is not the full path to your directory, is it?! I would try and use the absolute path name.

Flexer.

RE: How to set access control on public directory - Added by uthra Rao about 16 years ago

Hi Flexer

I have set-up redmine within a virtual host. In the virtualhost configuration file I have the following entry for redmine:

<Directory "/redmine/public">
AllowOverride all
order deny,allow
deny from all
allow from localhost
allow from IPaddress-1
allow from IPaddress-2
</Directory>

The real path is /var/www/VH_DIR/htdocs/redmine/public. I don't think I need the full path since apache know the root of that virtualhost and appends /redmine/public to /var/www/VH_DIR/htdocs/.

UR.

    (1-2/2)