Preventing outside access to my test server

Discussion in 'Apache' started by trevlar, Jan 20, 2007.

  1. #1
    Hi,

    How can I restrict access to my local Apache web server running on my box. If anyone enters my IP address, I don't want them being able to see my files.

    Is there a way to restrict it so the directory can only be accessed via 'localhost'?

    Thanks!
     
    trevlar, Jan 20, 2007 IP
  2. stuey

    stuey Peon

    Messages:
    160
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ]

    Block it via your firewall or restrict port 80 access from the WAN.
     
    stuey, Jan 22, 2007 IP
  3. sukantab

    sukantab Well-Known Member

    Messages:
    2,075
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    110
    #3
    do a deny all and then allow only your ip address in your htaccess.
     
    sukantab, Jan 24, 2007 IP
  4. lookzovt

    lookzovt Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    In httpd.conf:

    <Files "*">
    Order deny, allow
    Deny from all
    Allow from 127.0.0.1 192.168.0.7
    </Files>

    Now you can access from localhost and 192.168.0.7
     
    lookzovt, Jan 28, 2007 IP