Problem with Restricting Directory in Apache


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problem with Restricting Directory in Apache
# 1  
Old 01-29-2010
Problem with Restricting Directory in Apache

Hello,

I want to restrict access to our Subversion repositories to only our internal network.
I have a virtual host directive setup in Apache for the IP and port 443. When I put the following:

Code:
<VirtualHost 205.147.86.33:443>

<Directory "/var/www/svn/">
Order deny,allow

AllowOverride None

deny from all
Allow from 10.7.12.0/24
Allow from 205.15.86.0/24

</Directory>

    SSLEngine on
    ServerName edison.swi.com
    ServerAdmin sysadmin@swi.com
    SSLCertificateFile /etc/httpd/conf/intra.cer
    SSLCertificateKeyFile /etc/httpd/conf/intra.key
    DocumentRoot  /var/www/html/intraweb/htdocs
    ScriptAlias /cgi-bin/ "/var/www/html/intraweb/cgi-bin/"
    AddType application/x-httpd-php .php .php4 .php3 .phtml .php5
    AddType application/x-httpd-php-source .phps
 AddType application/x-httpd-php-source .phps
    #AddHandler cgi-script cgi pl
    ErrorLog /var/opt/CollabNet_Subversion/logs/error_log
    CustomLog /var/opt/CollabNet_Subversion/logs/access_log common

<Files .htaccess>
    order deny,allow
    deny from all
</Files>
< /VirtualHost>

I can still access the subversion repositories.
Only when I block /var completely I cannot access the repositories but doing that causes the pages on our intranet from being served.

Advice?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Restricting directory access in Apache server

Hi all, I have a web site that I'm serving on an Apache server, and it has a number of different folders, but I only want the user to be able to access certain ones -- the majority of them I don't want the user to access. I tried modifying my /etc/apache2/conf.d/security file to do this, but I... (1 Reply)
Discussion started by: Zel2008
1 Replies

2. UNIX for Dummies Questions & Answers

Restricting a Find search to the current directory only

Hi All, I am trying to delete file (with a mtime older than 2 days) from the current directory ONLY using: find . -daystart -maxdepth 1 -mtime 2 -exec rm {} \; but this doesn't seem to work it is still find files in subdirectories which I don't want to delete. Please can anyone offer... (2 Replies)
Discussion started by: daveu7
2 Replies

3. UNIX for Dummies Questions & Answers

Restricting a user to their home directory and below

I found this old closed thread: I can do these things, but how to I change someone's profile - where do I find the profile? I'm running Centos 5.6 ~~~~~~~~~ providing you have the password shell set to ksh, you can put this in his .profile: cd /opt/load alias -x cd=: (6 Replies)
Discussion started by: jjj0923
6 Replies

4. UNIX for Dummies Questions & Answers

Problem with Restricting Directory in Apache

Hello, I want to restrict access to our Subversion repositories to only our internal network. I have a virtual host directive setup in Apache for the IP and port 443. When I put the following: <Directory "/var/www/svn/"> Order allow,deny AllowOverride None Allow from 10.5.10.0/24 Allow... (1 Reply)
Discussion started by: mojoman
1 Replies

5. Solaris

Restricting SFTP user to a defined directory and home directory

Hi, I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP. The aim is to... (1 Reply)
Discussion started by: sftpuser
1 Replies

6. Solaris

Restricting FTP access for a particular directory

Dear All, I have created a user called "x" who is allowed only to FTP and it is working fine. Here my problem is, I want to give access to a particular directory say for eg:- /dump/test directory. I don't find any option in the useradd command to restrict access to this particular directory only... (1 Reply)
Discussion started by: Vijayakumarpc
1 Replies

7. Shell Programming and Scripting

Restricting zip to current directory only

I am using the following command in a C shell script: find . -name "*.*" -print | zip $ProjectZipFile -@ to zip files in a Unix (Sun and/or Linux) directory for archiving purposes. This command works fine, the only problem being that if sub-directories are present, they are included in... (5 Replies)
Discussion started by: phudgens
5 Replies

8. Web Development

apache, surfing a directory

Hi, I have a directory and I need a url that users can surf it.like ftp. my web server is apache. Thanks in advance. (2 Replies)
Discussion started by: Zaxon
2 Replies

9. UNIX for Dummies Questions & Answers

Question about Restricting Search path of FIND to current directory

Hi, By default FIND command searches for matching files in all the subdirectories within the specified path. Is there a way to restrict FIND command's search path to only the specified directory and NOT TO scan its subdirectories. Any help would be more than appreciated. Thanks and Regards (2 Replies)
Discussion started by: super_duper_guy
2 Replies

10. UNIX for Dummies Questions & Answers

apache directory browsing

How do i prevent clients from browsing directory structures if there is no index.html in a directory? For example, lets say that i dynamically create directories on in my doc root of an apache based web server. I know if i type the url and there is no index or default page in there, then apache... (1 Reply)
Discussion started by: ezekiel61
1 Replies
Login or Register to Ask a Question