+ Post New Thread
Results 1 to 7 of 7
Web Development Thread, Apache Question. in Coding and Web Development; Is it possible to set access to folders to only specific ip addresses / ranges? Have a webserver hosting 1 ...
  1. #1
    Guest

    Apache Question.

    Is it possible to set access to folders to only specific ip addresses / ranges?

    Have a webserver hosting 1 intranet site and 1 internet site. Want access to the internet site from school / home. Access to intranet site from school.

    Any ideas?

    Cheers/

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    639
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324

    Re: Apache Question.

    If this is what you're after:

    mod_access

    E.g: Allow from 10.1.0.0/255.255.0.0

    If not, I think you're looking at Virtual sites.

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Apache Question.

    Yes.

    Code:
    <Directory /intranet>
    Deny ALL
    Allow 10.0.0.0/24 
    </Directory
    
    <Directory /internet>
    Allow ALL
    Deny 10.0.0.0/24
    </Directory>
    If you need something more complex, use IP based virutal hosts instead.

  4. #4

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    639
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324

    Re: Apache Question.

    Lol, snap

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Apache Question.


  6. #6
    Guest

    Re: Apache Question.

    Thats just what i need

    Dumb question - where do I stick the code?

  7. #7

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    639
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324

    Re: Apache Question.

    In a similar tag to Geoff's example, <Directory>. It should be in your httpd.conf file, or in a .htaccess file in the actual directory (httpd.conf is better).

SHARE:
+ Post New Thread

Similar Threads

  1. Changing From II6 > Apache
    By FN-GM in forum Web Development
    Replies: 6
    Last Post: 2nd December 2007, 01:00 AM
  2. Apache on Windows with SSL.
    By maniac in forum How do you do....it?
    Replies: 4
    Last Post: 20th November 2007, 04:07 PM
  3. Apache 2.2 and mod_perl
    By apeo in forum Web Development
    Replies: 3
    Last Post: 6th November 2007, 10:40 AM
  4. Apache Permissions
    By CyberNerd in forum *nix
    Replies: 7
    Last Post: 28th April 2006, 01:20 PM
  5. Apache + IIS On the same box?
    By in forum Windows
    Replies: 25
    Last Post: 7th March 2006, 03:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •